aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/generated-artifacts/MultiSigWalletWithTimeLock.json
blob: 62c4c1c9f3be81db4824f5befcc6ac363fd2d1cf (plain) (blame)
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
{
    "schemaVersion": "2.0.0",
    "contractName": "MultiSigWalletWithTimeLock",
    "compilerOutput": {
        "abi": [
            {
                "constant": true,
                "inputs": [
                    {
                        "name": "",
                        "type": "uint256"
                    }
                ],
                "name": "owners",
                "outputs": [
                    {
                        "name": "",
                        "type": "address"
                    }
                ],
                "payable": false,
                "stateMutability": "view",
                "type": "function"
            },
            {
                "constant": false,
                "inputs": [
                    {
                        "name": "owner",
                        "type": "address"
                    }
                ],
                "name": "removeOwner",
                "outputs": [],
                "payable": false,
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "constant": false,
                "inputs": [
                    {
                        "name": "transactionId",
                        "type": "uint256"
                    }
                ],
                "name": "revokeConfirmation",
                "outputs": [],
                "payable": false,
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "constant": true,
                "inputs": [
                    {
                        "name": "",
                        "type": "address"
                    }
                ],
                "name": "isOwner",
                "outputs": [
                    {
                        "name": "",
                        "type": "bool"
                    }
                ],
                "payable": false,
                "stateMutability": "view",
                "type": "function"
            },
            {
                "constant": true,
                "inputs": [
                    {
                        "name": "",
                        "type": "uint256"
                    },
                    {
                        "name": "",
                        "type": "address"
                    }
                ],
                "name": "confirmations",
                "outputs": [
                    {
                        "name": "",
                        "type": "bool"
                    }
                ],
                "payable": false,
                "stateMutability": "view",
                "type": "function"
            },
            {
                "constant": true,
                "inputs": [],
                "name": "secondsTimeLocked",
                "outputs": [
                    {
                        "name": "",
                        "type": "uint256"
                    }
                ],
                "payable": false,
                "stateMutability": "view",
                "type": "function"
            },
            {
                "constant": true,
                "inputs": [
                    {
                        "name": "pending",
                        "type": "bool"
                    },
                    {
                        "name": "executed",
                        "type": "bool"
                    }
                ],
                "name": "getTransactionCount",
                "outputs": [
                    {
                        "name": "count",
                        "type": "uint256"
                    }
                ],
                "payable": false,
                "stateMutability": "view",
                "type": "function"
            },
            {
                "constant": false,
                "inputs": [
                    {
                        "name": "owner",
                        "type": "address"
                    }
                ],
                "name": "addOwner",
                "outputs": [],
                "payable": false,
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "constant": true,
                "inputs": [
                    {
                        "name": "transactionId",
                        "type": "uint256"
                    }
                ],
                "name": "isConfirmed",
                "outputs": [
                    {
                        "name": "",
                        "type": "bool"
                    }
                ],
                "payable": false,
                "stateMutability": "view",
                "type": "function"
            },
            {
                "constant": false,
                "inputs": [
                    {
                        "name": "_secondsTimeLocked",
                        "type": "uint256"
                    }
                ],
                "name": "changeTimeLock",
                "outputs": [],
                "payable": false,
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "constant": true,
                "inputs": [
                    {
                        "name": "transactionId",
                        "type": "uint256"
                    }
                ],
                "name": "getConfirmationCount",
                "outputs": [
                    {
                        "name": "count",
                        "type": "uint256"
                    }
                ],
                "payable": false,
                "stateMutability": "view",
                "type": "function"
            },
            {
                "constant": true,
                "inputs": [
                    {
                        "name": "",
                        "type": "uint256"
                    }
                ],
                "name": "transactions",
                "outputs": [
                    {
                        "name": "destination",
                        "type": "address"
                    },
                    {
                        "name": "value",
                        "type": "uint256"
                    },
                    {
                        "name": "data",
                        "type": "bytes"
                    },
                    {
                        "name": "executed",
                        "type": "bool"
                    }
                ],
                "payable": false,
                "stateMutability": "view",
                "type": "function"
            },
            {
                "constant": true,
                "inputs": [],
                "name": "getOwners",
                "outputs": [
                    {
                        "name": "",
                        "type": "address[]"
                    }
                ],
                "payable": false,
                "stateMutability": "view",
                "type": "function"
            },
            {
                "constant": true,
                "inputs": [
                    {
                        "name": "from",
                        "type": "uint256"
                    },
                    {
                        "name": "to",
                        "type": "uint256"
                    },
                    {
                        "name": "pending",
                        "type": "bool"
                    },
                    {
                        "name": "executed",
                        "type": "bool"
                    }
                ],
                "name": "getTransactionIds",
                "outputs": [
                    {
                        "name": "_transactionIds",
                        "type": "uint256[]"
                    }
                ],
                "payable": false,
                "stateMutability": "view",
                "type": "function"
            },
            {
                "constant": true,
                "inputs": [
                    {
                        "name": "transactionId",
                        "type": "uint256"
                    }
                ],
                "name": "getConfirmations",
                "outputs": [
                    {
                        "name": "_confirmations",
                        "type": "address[]"
                    }
                ],
                "payable": false,
                "stateMutability": "view",
                "type": "function"
            },
            {
                "constant": true,
                "inputs": [],
                "name": "transactionCount",
                "outputs": [
                    {
                        "name": "",
                        "type": "uint256"
                    }
                ],
                "payable": false,
                "stateMutability": "view",
                "type": "function"
            },
            {
                "constant": false,
                "inputs": [
                    {
                        "name": "_required",
                        "type": "uint256"
                    }
                ],
                "name": "changeRequirement",
                "outputs": [],
                "payable": false,
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "constant": false,
                "inputs": [
                    {
                        "name": "transactionId",
                        "type": "uint256"
                    }
                ],
                "name": "confirmTransaction",
                "outputs": [],
                "payable": false,
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "constant": false,
                "inputs": [
                    {
                        "name": "destination",
                        "type": "address"
                    },
                    {
                        "name": "value",
                        "type": "uint256"
                    },
                    {
                        "name": "data",
                        "type": "bytes"
                    }
                ],
                "name": "submitTransaction",
                "outputs": [
                    {
                        "name": "transactionId",
                        "type": "uint256"
                    }
                ],
                "payable": false,
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "constant": true,
                "inputs": [
                    {
                        "name": "",
                        "type": "uint256"
                    }
                ],
                "name": "confirmationTimes",
                "outputs": [
                    {
                        "name": "",
                        "type": "uint256"
                    }
                ],
                "payable": false,
                "stateMutability": "view",
                "type": "function"
            },
            {
                "constant": true,
                "inputs": [],
                "name": "MAX_OWNER_COUNT",
                "outputs": [
                    {
                        "name": "",
                        "type": "uint256"
                    }
                ],
                "payable": false,
                "stateMutability": "view",
                "type": "function"
            },
            {
                "constant": true,
                "inputs": [],
                "name": "required",
                "outputs": [
                    {
                        "name": "",
                        "type": "uint256"
                    }
                ],
                "payable": false,
                "stateMutability": "view",
                "type": "function"
            },
            {
                "constant": false,
                "inputs": [
                    {
                        "name": "owner",
                        "type": "address"
                    },
                    {
                        "name": "newOwner",
                        "type": "address"
                    }
                ],
                "name": "replaceOwner",
                "outputs": [],
                "payable": false,
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "constant": false,
                "inputs": [
                    {
                        "name": "transactionId",
                        "type": "uint256"
                    }
                ],
                "name": "executeTransaction",
                "outputs": [],
                "payable": false,
                "stateMutability": "nonpayable",
                "type": "function"
            },
            {
                "inputs": [
                    {
                        "name": "_owners",
                        "type": "address[]"
                    },
                    {
                        "name": "_required",
                        "type": "uint256"
                    },
                    {
                        "name": "_secondsTimeLocked",
                        "type": "uint256"
                    }
                ],
                "payable": false,
                "stateMutability": "nonpayable",
                "type": "constructor"
            },
            {
                "payable": true,
                "stateMutability": "payable",
                "type": "fallback"
            },
            {
                "anonymous": false,
                "inputs": [
                    {
                        "indexed": true,
                        "name": "transactionId",
                        "type": "uint256"
                    },
                    {
                        "indexed": false,
                        "name": "confirmationTime",
                        "type": "uint256"
                    }
                ],
                "name": "ConfirmationTimeSet",
                "type": "event"
            },
            {
                "anonymous": false,
                "inputs": [
                    {
                        "indexed": false,
                        "name": "secondsTimeLocked",
                        "type": "uint256"
                    }
                ],
                "name": "TimeLockChange",
                "type": "event"
            },
            {
                "anonymous": false,
                "inputs": [
                    {
                        "indexed": true,
                        "name": "sender",
                        "type": "address"
                    },
                    {
                        "indexed": true,
                        "name": "transactionId",
                        "type": "uint256"
                    }
                ],
                "name": "Confirmation",
                "type": "event"
            },
            {
                "anonymous": false,
                "inputs": [
                    {
                        "indexed": true,
                        "name": "sender",
                        "type": "address"
                    },
                    {
                        "indexed": true,
                        "name": "transactionId",
                        "type": "uint256"
                    }
                ],
                "name": "Revocation",
                "type": "event"
            },
            {
                "anonymous": false,
                "inputs": [
                    {
                        "indexed": true,
                        "name": "transactionId",
                        "type": "uint256"
                    }
                ],
                "name": "Submission",
                "type": "event"
            },
            {
                "anonymous": false,
                "inputs": [
                    {
                        "indexed": true,
                        "name": "transactionId",
                        "type": "uint256"
                    }
                ],
                "name": "Execution",
                "type": "event"
            },
            {
                "anonymous": false,
                "inputs": [
                    {
                        "indexed": true,
                        "name": "transactionId",
                        "type": "uint256"
                    }
                ],
                "name": "ExecutionFailure",
                "type": "event"
            },
            {
                "anonymous": false,
                "inputs": [
                    {
                        "indexed": true,
                        "name": "sender",
                        "type": "address"
                    },
                    {
                        "indexed": false,
                        "name": "value",
                        "type": "uint256"
                    }
                ],
                "name": "Deposit",
                "type": "event"
            },
            {
                "anonymous": false,
                "inputs": [
                    {
                        "indexed": true,
                        "name": "owner",
                        "type": "address"
                    }
                ],
                "name": "OwnerAddition",
                "type": "event"
            },
            {
                "anonymous": false,
                "inputs": [
                    {
                        "indexed": true,
                        "name": "owner",
                        "type": "address"
                    }
                ],
                "name": "OwnerRemoval",
                "type": "event"
            },
            {
                "anonymous": false,
                "inputs": [
                    {
                        "indexed": false,
                        "name": "required",
                        "type": "uint256"
                    }
                ],
                "name": "RequirementChange",
                "type": "event"
            }
        ],
        "evm": {
            "bytecode": {
                "linkReferences": {},
                "object": "0x60806040523480156200001157600080fd5b5060405162001cc938038062001cc9833981016040908152815160208301519183015192018051909290839083906000908260328211801590620000555750818111155b80156200006157508015155b80156200006d57508115155b15156200007957600080fd5b600092505b845183101562000151576002600086858151811015156200009b57fe5b6020908102909101810151600160a060020a031682528101919091526040016000205460ff16158015620000f157508483815181101515620000d957fe5b90602001906020020151600160a060020a0316600014155b1515620000fd57600080fd5b60016002600087868151811015156200011257fe5b602090810291909101810151600160a060020a03168252810191909152604001600020805460ff1916911515919091179055600192909201916200007e565b8451620001669060039060208801906200017d565b505050600491909155505060065550620002119050565b828054828255906000526020600020908101928215620001d5579160200282015b82811115620001d55782518254600160a060020a031916600160a060020a039091161782556020909201916001909101906200019e565b50620001e3929150620001e7565b5090565b6200020e91905b80821115620001e3578054600160a060020a0319168155600101620001ee565b90565b611aa880620002216000396000f30060806040526004361061013d5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663025e7c27811461017f578063173825d9146101c057806320ea8d86146101ee5780632f54bf6e146102065780633411c81c1461024857806337bd78a01461027957806354741525146102a05780637065cb48146102bf578063784547a7146102ed5780637ad28c51146103055780638b51d13f1461031d5780639ace38c214610335578063a0e67e2b1461040a578063a8abe69a1461046f578063b5dc40c314610494578063b77bf600146104ac578063ba51a6df146104c1578063c01a8c84146104d9578063c6427474146104f1578063d38f2d8214610567578063d74f8edd1461057f578063dc8452cd14610594578063e20056e6146105a9578063ee22610b146105dd575b600034111561017d5760408051348152905133917fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c919081900360200190a25b005b34801561018b57600080fd5b506101976004356105f5565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156101cc57600080fd5b5061017d73ffffffffffffffffffffffffffffffffffffffff6004351661062a565b3480156101fa57600080fd5b5061017d600435610881565b34801561021257600080fd5b5061023473ffffffffffffffffffffffffffffffffffffffff60043516610959565b604080519115158252519081900360200190f35b34801561025457600080fd5b5061023460043573ffffffffffffffffffffffffffffffffffffffff6024351661096e565b34801561028557600080fd5b5061028e61098e565b60408051918252519081900360200190f35b3480156102ac57600080fd5b5061028e60043515156024351515610994565b3480156102cb57600080fd5b5061017d73ffffffffffffffffffffffffffffffffffffffff60043516610a00565b3480156102f957600080fd5b50610234600435610b75565b34801561031157600080fd5b5061017d600435610c06565b34801561032957600080fd5b5061028e600435610c4d565b34801561034157600080fd5b5061034d600435610cc9565b604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018060200183151515158152602001828103825284818151815260200191508051906020019080838360005b838110156103cc5781810151838201526020016103b4565b50505050905090810190601f1680156103f95780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b34801561041657600080fd5b5061041f610db2565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561045b578181015183820152602001610443565b505050509050019250505060405180910390f35b34801561047b57600080fd5b5061041f60043560243560443515156064351515610e22565b3480156104a057600080fd5b5061041f600435610f5b565b3480156104b857600080fd5b5061028e611108565b3480156104cd57600080fd5b5061017d60043561110e565b3480156104e557600080fd5b5061017d60043561118d565b3480156104fd57600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845261028e94823573ffffffffffffffffffffffffffffffffffffffff169460248035953695946064949201919081908401838280828437509497506113099650505050505050565b34801561057357600080fd5b5061028e600435611328565b34801561058b57600080fd5b5061028e61133a565b3480156105a057600080fd5b5061028e61133f565b3480156105b557600080fd5b5061017d73ffffffffffffffffffffffffffffffffffffffff60043581169060243516611345565b3480156105e957600080fd5b5061017d600435611555565b600380548290811061060357fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b600033301461063857600080fd5b73ffffffffffffffffffffffffffffffffffffffff8216600090815260026020526040902054829060ff16151561066e57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260026020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905591505b6003547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018210156107f1578273ffffffffffffffffffffffffffffffffffffffff1660038381548110151561070e57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1614156107e657600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190811061076657fe5b6000918252602090912001546003805473ffffffffffffffffffffffffffffffffffffffff909216918490811061079957fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506107f1565b6001909101906106bc565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019061082290826119bb565b50600354600454111561083b5760035461083b9061110e565b60405173ffffffffffffffffffffffffffffffffffffffff8416907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a2505050565b3360008181526002602052604090205460ff16151561089f57600080fd5b60008281526001602090815260408083203380855292529091205483919060ff1615156108cb57600080fd5b600084815260208190526040902060030154849060ff16156108ec57600080fd5b600085815260016020908152604080832033808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b60026020526000908152604090205460ff1681565b600160209081526000928352604080842090915290825290205460ff1681565b60065481565b6000805b6005548110156109f9578380156109c1575060008181526020819052604090206003015460ff16155b806109e557508280156109e5575060008181526020819052604090206003015460ff165b156109f1576001820191505b600101610998565b5092915050565b333014610a0c57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116600090815260026020526040902054819060ff1615610a4157600080fd5b8173ffffffffffffffffffffffffffffffffffffffff81161515610a6457600080fd5b60038054905060010160045460328211158015610a815750818111155b8015610a8c57508015155b8015610a9757508115155b1515610aa257600080fd5b73ffffffffffffffffffffffffffffffffffffffff851660008181526002602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0180547fffffffffffffffffffffffff00000000000000000000000000000000000000001684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b600354811015610bff5760008481526001602052604081206003805491929184908110610ba357fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205460ff1615610be4576001820191505b600454821415610bf75760019250610bff565b600101610b7a565b5050919050565b333014610c1257600080fd5b60068190556040805182815290517fd1c9101a34feff75cccef14a28785a0279cb0b49c1f321f21f5f422e746b43779181900360200190a150565b6000805b600354811015610cc35760008381526001602052604081206003805491929184908110610c7a57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205460ff1615610cbb576001820191505b600101610c51565b50919050565b60006020818152918152604090819020805460018083015460028085018054875161010095821615959095027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff011691909104601f810188900488028401880190965285835273ffffffffffffffffffffffffffffffffffffffff90931695909491929190830182828015610d9f5780601f10610d7457610100808354040283529160200191610d9f565b820191906000526020600020905b815481529060010190602001808311610d8257829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610e1757602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610dec575b505050505090505b90565b606080600080600554604051908082528060200260200182016040528015610e54578160200160208202803883390190505b50925060009150600090505b600554811015610edb57858015610e89575060008181526020819052604090206003015460ff16155b80610ead5750848015610ead575060008181526020819052604090206003015460ff165b15610ed357808383815181101515610ec157fe5b60209081029091010152600191909101905b600101610e60565b878703604051908082528060200260200182016040528015610f07578160200160208202803883390190505b5093508790505b86811015610f50578281815181101515610f2457fe5b9060200190602002015184898303815181101515610f3e57fe5b60209081029091010152600101610f0e565b505050949350505050565b606080600080600380549050604051908082528060200260200182016040528015610f90578160200160208202803883390190505b50925060009150600090505b6003548110156110745760008581526001602052604081206003805491929184908110610fc557fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205460ff161561106c57600380548290811061100d57fe5b600091825260209091200154835173ffffffffffffffffffffffffffffffffffffffff9091169084908490811061104057fe5b73ffffffffffffffffffffffffffffffffffffffff909216602092830290910190910152600191909101905b600101610f9c565b8160405190808252806020026020018201604052801561109e578160200160208202803883390190505b509350600090505b818110156111005782818151811015156110bc57fe5b9060200190602002015184828151811015156110d457fe5b73ffffffffffffffffffffffffffffffffffffffff9092166020928302909101909101526001016110a6565b505050919050565b60055481565b33301461111a57600080fd5b600354816032821180159061112f5750818111155b801561113a57508015155b801561114557508115155b151561115057600080fd5b60048390556040805184815290517fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9181900360200190a1505050565b3360008181526002602052604090205460ff1615156111ab57600080fd5b600082815260208190526040902054829073ffffffffffffffffffffffffffffffffffffffff1615156111dd57600080fd5b60008381526001602090815260408083203380855292529091205484919060ff161561120857600080fd5b8461121281610b75565b1561127e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f54585f46554c4c595f434f4e4649524d45440000000000000000000000000000604482015290519081900360640190fd5b600086815260016020818152604080842033808652925280842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016909317909255905188927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a36112f286610b75565b1561130157611301864261181a565b505050505050565b6000611316848484611865565b90506113218161118d565b9392505050565b60076020526000908152604090205481565b603281565b60045481565b600033301461135357600080fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260026020526040902054839060ff16151561138957600080fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260026020526040902054839060ff16156113be57600080fd5b600092505b600354831015611483578473ffffffffffffffffffffffffffffffffffffffff166003848154811015156113f357fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff161415611478578360038481548110151561142b57fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611483565b6001909201916113c3565b73ffffffffffffffffffffffffffffffffffffffff80861660008181526002602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0090811690915593881682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a260405173ffffffffffffffffffffffffffffffffffffffff8516907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a25050505050565b600081815260208190526040812060030154829060ff161561157657600080fd5b8261158081610b75565b15156115ed57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f54585f4e4f545f46554c4c595f434f4e4649524d454400000000000000000000604482015290519081900360640190fd5b60065460008581526007602052604090205485910142101561167057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f54494d455f4c4f434b5f494e434f4d504c455445000000000000000000000000604482015290519081900360640190fd5b600085815260208181526040918290206003810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815481830154600280850180548851601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff978316156101000297909701909116929092049485018790048702820187019097528381529399506117889573ffffffffffffffffffffffffffffffffffffffff9092169490939190839083018282801561177e5780601f106117535761010080835404028352916020019161177e565b820191906000526020600020905b81548152906001019060200180831161176157829003601f168201915b5050505050611998565b156117bd5760405185907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a2611813565b60405185907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a26003840180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555b5050505050565b6000828152600760209081526040918290208390558151838152915184927f0b237afe65f1514fd7ea3f923ea4fe792bdd07000a912b6cd1602a8e7f573c8d92908290030190a25050565b60008373ffffffffffffffffffffffffffffffffffffffff8116151561188a57600080fd5b6005546040805160808101825273ffffffffffffffffffffffffffffffffffffffff8881168252602080830189815283850189815260006060860181905287815280845295909520845181547fffffffffffffffffffffffff000000000000000000000000000000000000000016941693909317835551600183015592518051949650919390926119229260028501929101906119e4565b5060609190910151600390910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905560058054600101905560405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b6000806040516020840160008287838a8c6187965a03f198975050505050505050565b8154818355818111156119df576000838152602090206119df918101908301611a62565b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611a2557805160ff1916838001178555611a52565b82800160010185558215611a52579182015b82811115611a52578251825591602001919060010190611a37565b50611a5e929150611a62565b5090565b610e1f91905b80821115611a5e5760008155600101611a685600a165627a7a72305820e5babec10610b2cd6468fa63c48e69cdad30621a7c944401386af3715285734e0029",
                "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH3 0x11 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH3 0x1CC9 CODESIZE SUB DUP1 PUSH3 0x1CC9 DUP4 CODECOPY DUP2 ADD PUSH1 0x40 SWAP1 DUP2 MSTORE DUP2 MLOAD PUSH1 0x20 DUP4 ADD MLOAD SWAP2 DUP4 ADD MLOAD SWAP3 ADD DUP1 MLOAD SWAP1 SWAP3 SWAP1 DUP4 SWAP1 DUP4 SWAP1 PUSH1 0x0 SWAP1 DUP3 PUSH1 0x32 DUP3 GT DUP1 ISZERO SWAP1 PUSH3 0x55 JUMPI POP DUP2 DUP2 GT ISZERO JUMPDEST DUP1 ISZERO PUSH3 0x61 JUMPI POP DUP1 ISZERO ISZERO JUMPDEST DUP1 ISZERO PUSH3 0x6D JUMPI POP DUP2 ISZERO ISZERO JUMPDEST ISZERO ISZERO PUSH3 0x79 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 SWAP3 POP JUMPDEST DUP5 MLOAD DUP4 LT ISZERO PUSH3 0x151 JUMPI PUSH1 0x2 PUSH1 0x0 DUP7 DUP6 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH3 0x9B JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP1 SWAP2 ADD DUP2 ADD MLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND DUP3 MSTORE DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 ADD PUSH1 0x0 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO DUP1 ISZERO PUSH3 0xF1 JUMPI POP DUP5 DUP4 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH3 0xD9 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x20 ADD SWAP1 PUSH1 0x20 MUL ADD MLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 EQ ISZERO JUMPDEST ISZERO ISZERO PUSH3 0xFD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x2 PUSH1 0x0 DUP8 DUP7 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH3 0x112 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD DUP2 ADD MLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND DUP3 MSTORE DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 ADD PUSH1 0x0 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP2 ISZERO ISZERO SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE PUSH1 0x1 SWAP3 SWAP1 SWAP3 ADD SWAP2 PUSH3 0x7E JUMP JUMPDEST DUP5 MLOAD PUSH3 0x166 SWAP1 PUSH1 0x3 SWAP1 PUSH1 0x20 DUP9 ADD SWAP1 PUSH3 0x17D JUMP JUMPDEST POP POP POP PUSH1 0x4 SWAP2 SWAP1 SWAP2 SSTORE POP POP PUSH1 0x6 SSTORE POP PUSH3 0x211 SWAP1 POP JUMP JUMPDEST DUP3 DUP1 SLOAD DUP3 DUP3 SSTORE SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 DUP2 ADD SWAP3 DUP3 ISZERO PUSH3 0x1D5 JUMPI SWAP2 PUSH1 0x20 MUL DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH3 0x1D5 JUMPI DUP3 MLOAD DUP3 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB NOT AND PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP1 SWAP2 AND OR DUP3 SSTORE PUSH1 0x20 SWAP1 SWAP3 ADD SWAP2 PUSH1 0x1 SWAP1 SWAP2 ADD SWAP1 PUSH3 0x19E JUMP JUMPDEST POP PUSH3 0x1E3 SWAP3 SWAP2 POP PUSH3 0x1E7 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST PUSH3 0x20E SWAP2 SWAP1 JUMPDEST DUP1 DUP3 GT ISZERO PUSH3 0x1E3 JUMPI DUP1 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB NOT AND DUP2 SSTORE PUSH1 0x1 ADD PUSH3 0x1EE JUMP JUMPDEST SWAP1 JUMP JUMPDEST PUSH2 0x1AA8 DUP1 PUSH3 0x221 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN STOP PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x13D JUMPI PUSH4 0xFFFFFFFF PUSH29 0x100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0x25E7C27 DUP2 EQ PUSH2 0x17F JUMPI DUP1 PUSH4 0x173825D9 EQ PUSH2 0x1C0 JUMPI DUP1 PUSH4 0x20EA8D86 EQ PUSH2 0x1EE JUMPI DUP1 PUSH4 0x2F54BF6E EQ PUSH2 0x206 JUMPI DUP1 PUSH4 0x3411C81C EQ PUSH2 0x248 JUMPI DUP1 PUSH4 0x37BD78A0 EQ PUSH2 0x279 JUMPI DUP1 PUSH4 0x54741525 EQ PUSH2 0x2A0 JUMPI DUP1 PUSH4 0x7065CB48 EQ PUSH2 0x2BF JUMPI DUP1 PUSH4 0x784547A7 EQ PUSH2 0x2ED JUMPI DUP1 PUSH4 0x7AD28C51 EQ PUSH2 0x305 JUMPI DUP1 PUSH4 0x8B51D13F EQ PUSH2 0x31D JUMPI DUP1 PUSH4 0x9ACE38C2 EQ PUSH2 0x335 JUMPI DUP1 PUSH4 0xA0E67E2B EQ PUSH2 0x40A JUMPI DUP1 PUSH4 0xA8ABE69A EQ PUSH2 0x46F JUMPI DUP1 PUSH4 0xB5DC40C3 EQ PUSH2 0x494 JUMPI DUP1 PUSH4 0xB77BF600 EQ PUSH2 0x4AC JUMPI DUP1 PUSH4 0xBA51A6DF EQ PUSH2 0x4C1 JUMPI DUP1 PUSH4 0xC01A8C84 EQ PUSH2 0x4D9 JUMPI DUP1 PUSH4 0xC6427474 EQ PUSH2 0x4F1 JUMPI DUP1 PUSH4 0xD38F2D82 EQ PUSH2 0x567 JUMPI DUP1 PUSH4 0xD74F8EDD EQ PUSH2 0x57F JUMPI DUP1 PUSH4 0xDC8452CD EQ PUSH2 0x594 JUMPI DUP1 PUSH4 0xE20056E6 EQ PUSH2 0x5A9 JUMPI DUP1 PUSH4 0xEE22610B EQ PUSH2 0x5DD JUMPI JUMPDEST PUSH1 0x0 CALLVALUE GT ISZERO PUSH2 0x17D JUMPI PUSH1 0x40 DUP1 MLOAD CALLVALUE DUP2 MSTORE SWAP1 MLOAD CALLER SWAP2 PUSH32 0xE1FFFCC4923D04B559F4D29A8BFC6CDA04EB5B0D3C460751C2402C5C5CC9109C SWAP2 SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 LOG2 JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x18B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x197 PUSH1 0x4 CALLDATALOAD PUSH2 0x5F5 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1CC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x17D PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH2 0x62A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1FA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x17D PUSH1 0x4 CALLDATALOAD PUSH2 0x881 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x212 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x234 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH2 0x959 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x254 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x234 PUSH1 0x4 CALLDATALOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x24 CALLDATALOAD AND PUSH2 0x96E JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x285 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x28E PUSH2 0x98E JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2AC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x28E PUSH1 0x4 CALLDATALOAD ISZERO ISZERO PUSH1 0x24 CALLDATALOAD ISZERO ISZERO PUSH2 0x994 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2CB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x17D PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH2 0xA00 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2F9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x234 PUSH1 0x4 CALLDATALOAD PUSH2 0xB75 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x311 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x17D PUSH1 0x4 CALLDATALOAD PUSH2 0xC06 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x329 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x28E PUSH1 0x4 CALLDATALOAD PUSH2 0xC4D JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x341 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x34D PUSH1 0x4 CALLDATALOAD PUSH2 0xCC9 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP6 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP4 ISZERO ISZERO ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP5 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x3CC JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x3B4 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x3F9 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP6 POP POP POP POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x416 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x41F PUSH2 0xDB2 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 DUP2 ADD SWAP2 MUL DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x45B JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x443 JUMP JUMPDEST POP POP POP POP SWAP1 POP ADD SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x47B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x41F PUSH1 0x4 CALLDATALOAD PUSH1 0x24 CALLDATALOAD PUSH1 0x44 CALLDATALOAD ISZERO ISZERO PUSH1 0x64 CALLDATALOAD ISZERO ISZERO PUSH2 0xE22 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x4A0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x41F PUSH1 0x4 CALLDATALOAD PUSH2 0xF5B JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x4B8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x28E PUSH2 0x1108 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x4CD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x17D PUSH1 0x4 CALLDATALOAD PUSH2 0x110E JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x4E5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x17D PUSH1 0x4 CALLDATALOAD PUSH2 0x118D JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x4FD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x4 PUSH1 0x44 CALLDATALOAD DUP2 DUP2 ADD CALLDATALOAD PUSH1 0x1F DUP2 ADD DUP5 SWAP1 DIV DUP5 MUL DUP6 ADD DUP5 ADD SWAP1 SWAP6 MSTORE DUP5 DUP5 MSTORE PUSH2 0x28E SWAP5 DUP3 CALLDATALOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP5 PUSH1 0x24 DUP1 CALLDATALOAD SWAP6 CALLDATASIZE SWAP6 SWAP5 PUSH1 0x64 SWAP5 SWAP3 ADD SWAP2 SWAP1 DUP2 SWAP1 DUP5 ADD DUP4 DUP3 DUP1 DUP3 DUP5 CALLDATACOPY POP SWAP5 SWAP8 POP PUSH2 0x1309 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x573 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x28E PUSH1 0x4 CALLDATALOAD PUSH2 0x1328 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x58B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x28E PUSH2 0x133A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x5A0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x28E PUSH2 0x133F JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x5B5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x17D PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD DUP2 AND SWAP1 PUSH1 0x24 CALLDATALOAD AND PUSH2 0x1345 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x5E9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x17D PUSH1 0x4 CALLDATALOAD PUSH2 0x1555 JUMP JUMPDEST PUSH1 0x3 DUP1 SLOAD DUP3 SWAP1 DUP2 LT PUSH2 0x603 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 POP DUP2 JUMP JUMPDEST PUSH1 0x0 CALLER ADDRESS EQ PUSH2 0x638 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP3 SWAP1 PUSH1 0xFF AND ISZERO ISZERO PUSH2 0x66E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND SWAP1 SSTORE SWAP2 POP JUMPDEST PUSH1 0x3 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ADD DUP3 LT ISZERO PUSH2 0x7F1 JUMPI DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x3 DUP4 DUP2 SLOAD DUP2 LT ISZERO ISZERO PUSH2 0x70E JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO PUSH2 0x7E6 JUMPI PUSH1 0x3 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 ADD SWAP1 DUP2 LT PUSH2 0x766 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH1 0x3 DUP1 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP3 AND SWAP2 DUP5 SWAP1 DUP2 LT PUSH2 0x799 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP PUSH2 0x7F1 JUMP JUMPDEST PUSH1 0x1 SWAP1 SWAP2 ADD SWAP1 PUSH2 0x6BC JUMP JUMPDEST PUSH1 0x3 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ADD SWAP1 PUSH2 0x822 SWAP1 DUP3 PUSH2 0x19BB JUMP JUMPDEST POP PUSH1 0x3 SLOAD PUSH1 0x4 SLOAD GT ISZERO PUSH2 0x83B JUMPI PUSH1 0x3 SLOAD PUSH2 0x83B SWAP1 PUSH2 0x110E JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP5 AND SWAP1 PUSH32 0x8001553A916EF2F495D26A907CC54D96ED840D7BDA71E73194BF5A9DF7A76B90 SWAP1 PUSH1 0x0 SWAP1 LOG2 POP POP POP JUMP JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO ISZERO PUSH2 0x89F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP3 MSTORE SWAP1 SWAP2 KECCAK256 SLOAD DUP4 SWAP2 SWAP1 PUSH1 0xFF AND ISZERO ISZERO PUSH2 0x8CB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x3 ADD SLOAD DUP5 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x8EC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP3 MSTORE DUP1 DUP4 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND SWAP1 SSTORE MLOAD DUP8 SWAP3 PUSH32 0xF6A317157440607F36269043EB55F1287A5A19BA2216AFEAB88CD46CBCFB88E9 SWAP2 LOG3 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND DUP2 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x0 SWAP3 DUP4 MSTORE PUSH1 0x40 DUP1 DUP5 KECCAK256 SWAP1 SWAP2 MSTORE SWAP1 DUP3 MSTORE SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND DUP2 JUMP JUMPDEST PUSH1 0x6 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 JUMPDEST PUSH1 0x5 SLOAD DUP2 LT ISZERO PUSH2 0x9F9 JUMPI DUP4 DUP1 ISZERO PUSH2 0x9C1 JUMPI POP PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x3 ADD SLOAD PUSH1 0xFF AND ISZERO JUMPDEST DUP1 PUSH2 0x9E5 JUMPI POP DUP3 DUP1 ISZERO PUSH2 0x9E5 JUMPI POP PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x3 ADD SLOAD PUSH1 0xFF AND JUMPDEST ISZERO PUSH2 0x9F1 JUMPI PUSH1 0x1 DUP3 ADD SWAP2 POP JUMPDEST PUSH1 0x1 ADD PUSH2 0x998 JUMP JUMPDEST POP SWAP3 SWAP2 POP POP JUMP JUMPDEST CALLER ADDRESS EQ PUSH2 0xA0C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP2 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0xA41 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND ISZERO ISZERO PUSH2 0xA64 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 DUP1 SLOAD SWAP1 POP PUSH1 0x1 ADD PUSH1 0x4 SLOAD PUSH1 0x32 DUP3 GT ISZERO DUP1 ISZERO PUSH2 0xA81 JUMPI POP DUP2 DUP2 GT ISZERO JUMPDEST DUP1 ISZERO PUSH2 0xA8C JUMPI POP DUP1 ISZERO ISZERO JUMPDEST DUP1 ISZERO PUSH2 0xA97 JUMPI POP DUP2 ISZERO ISZERO JUMPDEST ISZERO ISZERO PUSH2 0xAA2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP6 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND PUSH1 0x1 SWAP1 DUP2 OR SWAP1 SWAP2 SSTORE PUSH1 0x3 DUP1 SLOAD SWAP2 DUP3 ADD DUP2 SSTORE DUP4 MSTORE PUSH32 0xC2575A0E9E593C00F959F8C92F12DB2869C3395A3B0502D05E2516446F71F85B ADD DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND DUP5 OR SWAP1 SSTORE MLOAD PUSH32 0xF39E6E1EB0EDCF53C221607B54B00CD28F3196FED0A24994DC308B8F611B682D SWAP2 SWAP1 LOG2 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP1 JUMPDEST PUSH1 0x3 SLOAD DUP2 LT ISZERO PUSH2 0xBFF JUMPI PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH1 0x3 DUP1 SLOAD SWAP2 SWAP3 SWAP2 DUP5 SWAP1 DUP2 LT PUSH2 0xBA3 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 KECCAK256 SWAP1 SWAP2 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 MSTORE DUP3 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x40 ADD SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0xBE4 JUMPI PUSH1 0x1 DUP3 ADD SWAP2 POP JUMPDEST PUSH1 0x4 SLOAD DUP3 EQ ISZERO PUSH2 0xBF7 JUMPI PUSH1 0x1 SWAP3 POP PUSH2 0xBFF JUMP JUMPDEST PUSH1 0x1 ADD PUSH2 0xB7A JUMP JUMPDEST POP POP SWAP2 SWAP1 POP JUMP JUMPDEST CALLER ADDRESS EQ PUSH2 0xC12 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x6 DUP2 SWAP1 SSTORE PUSH1 0x40 DUP1 MLOAD DUP3 DUP2 MSTORE SWAP1 MLOAD PUSH32 0xD1C9101A34FEFF75CCCEF14A28785A0279CB0B49C1F321F21F5F422E746B4377 SWAP2 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 LOG1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 JUMPDEST PUSH1 0x3 SLOAD DUP2 LT ISZERO PUSH2 0xCC3 JUMPI PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH1 0x3 DUP1 SLOAD SWAP2 SWAP3 SWAP2 DUP5 SWAP1 DUP2 LT PUSH2 0xC7A JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 KECCAK256 SWAP1 SWAP2 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 MSTORE DUP3 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x40 ADD SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0xCBB JUMPI PUSH1 0x1 DUP3 ADD SWAP2 POP JUMPDEST PUSH1 0x1 ADD PUSH2 0xC51 JUMP JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP2 DUP2 MSTORE SWAP2 DUP2 MSTORE PUSH1 0x40 SWAP1 DUP2 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0x1 DUP1 DUP4 ADD SLOAD PUSH1 0x2 DUP1 DUP6 ADD DUP1 SLOAD DUP8 MLOAD PUSH2 0x100 SWAP6 DUP3 AND ISZERO SWAP6 SWAP1 SWAP6 MUL PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ADD AND SWAP2 SWAP1 SWAP2 DIV PUSH1 0x1F DUP2 ADD DUP9 SWAP1 DIV DUP9 MUL DUP5 ADD DUP9 ADD SWAP1 SWAP7 MSTORE DUP6 DUP4 MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP4 AND SWAP6 SWAP1 SWAP5 SWAP2 SWAP3 SWAP2 SWAP1 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0xD9F JUMPI DUP1 PUSH1 0x1F LT PUSH2 0xD74 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0xD9F JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0xD82 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP PUSH1 0x3 SWAP1 SWAP4 ADD SLOAD SWAP2 SWAP3 POP POP PUSH1 0xFF AND DUP5 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x3 DUP1 SLOAD DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD DUP1 ISZERO PUSH2 0xE17 JUMPI PUSH1 0x20 MUL DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x1 SWAP1 SWAP2 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0xDEC JUMPI JUMPDEST POP POP POP POP POP SWAP1 POP JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP1 PUSH1 0x0 DUP1 PUSH1 0x5 SLOAD PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xE54 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CODESIZE DUP4 CODECOPY ADD SWAP1 POP JUMPDEST POP SWAP3 POP PUSH1 0x0 SWAP2 POP PUSH1 0x0 SWAP1 POP JUMPDEST PUSH1 0x5 SLOAD DUP2 LT ISZERO PUSH2 0xEDB JUMPI DUP6 DUP1 ISZERO PUSH2 0xE89 JUMPI POP PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x3 ADD SLOAD PUSH1 0xFF AND ISZERO JUMPDEST DUP1 PUSH2 0xEAD JUMPI POP DUP5 DUP1 ISZERO PUSH2 0xEAD JUMPI POP PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x3 ADD SLOAD PUSH1 0xFF AND JUMPDEST ISZERO PUSH2 0xED3 JUMPI DUP1 DUP4 DUP4 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0xEC1 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 SWAP2 SWAP1 SWAP2 ADD SWAP1 JUMPDEST PUSH1 0x1 ADD PUSH2 0xE60 JUMP JUMPDEST DUP8 DUP8 SUB PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xF07 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CODESIZE DUP4 CODECOPY ADD SWAP1 POP JUMPDEST POP SWAP4 POP DUP8 SWAP1 POP JUMPDEST DUP7 DUP2 LT ISZERO PUSH2 0xF50 JUMPI DUP3 DUP2 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0xF24 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x20 ADD SWAP1 PUSH1 0x20 MUL ADD MLOAD DUP5 DUP10 DUP4 SUB DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0xF3E JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0xF0E JUMP JUMPDEST POP POP POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x60 DUP1 PUSH1 0x0 DUP1 PUSH1 0x3 DUP1 SLOAD SWAP1 POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xF90 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CODESIZE DUP4 CODECOPY ADD SWAP1 POP JUMPDEST POP SWAP3 POP PUSH1 0x0 SWAP2 POP PUSH1 0x0 SWAP1 POP JUMPDEST PUSH1 0x3 SLOAD DUP2 LT ISZERO PUSH2 0x1074 JUMPI PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH1 0x3 DUP1 SLOAD SWAP2 SWAP3 SWAP2 DUP5 SWAP1 DUP2 LT PUSH2 0xFC5 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 KECCAK256 SWAP1 SWAP2 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 MSTORE DUP3 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x40 ADD SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x106C JUMPI PUSH1 0x3 DUP1 SLOAD DUP3 SWAP1 DUP2 LT PUSH2 0x100D JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD DUP4 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP2 AND SWAP1 DUP5 SWAP1 DUP5 SWAP1 DUP2 LT PUSH2 0x1040 JUMPI INVALID JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP3 AND PUSH1 0x20 SWAP3 DUP4 MUL SWAP1 SWAP2 ADD SWAP1 SWAP2 ADD MSTORE PUSH1 0x1 SWAP2 SWAP1 SWAP2 ADD SWAP1 JUMPDEST PUSH1 0x1 ADD PUSH2 0xF9C JUMP JUMPDEST DUP2 PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x109E JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CODESIZE DUP4 CODECOPY ADD SWAP1 POP JUMPDEST POP SWAP4 POP PUSH1 0x0 SWAP1 POP JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x1100 JUMPI DUP3 DUP2 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0x10BC JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x20 ADD SWAP1 PUSH1 0x20 MUL ADD MLOAD DUP5 DUP3 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0x10D4 JUMPI INVALID JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP3 AND PUSH1 0x20 SWAP3 DUP4 MUL SWAP1 SWAP2 ADD SWAP1 SWAP2 ADD MSTORE PUSH1 0x1 ADD PUSH2 0x10A6 JUMP JUMPDEST POP POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x5 SLOAD DUP2 JUMP JUMPDEST CALLER ADDRESS EQ PUSH2 0x111A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 SLOAD DUP2 PUSH1 0x32 DUP3 GT DUP1 ISZERO SWAP1 PUSH2 0x112F JUMPI POP DUP2 DUP2 GT ISZERO JUMPDEST DUP1 ISZERO PUSH2 0x113A JUMPI POP DUP1 ISZERO ISZERO JUMPDEST DUP1 ISZERO PUSH2 0x1145 JUMPI POP DUP2 ISZERO ISZERO JUMPDEST ISZERO ISZERO PUSH2 0x1150 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x4 DUP4 SWAP1 SSTORE PUSH1 0x40 DUP1 MLOAD DUP5 DUP2 MSTORE SWAP1 MLOAD PUSH32 0xA3F1EE9126A074D9326C682F561767F710E927FAA811F7A99829D49DC421797A SWAP2 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 LOG1 POP POP POP JUMP JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO ISZERO PUSH2 0x11AB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP3 SWAP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND ISZERO ISZERO PUSH2 0x11DD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP3 MSTORE SWAP1 SWAP2 KECCAK256 SLOAD DUP5 SWAP2 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x1208 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP5 PUSH2 0x1212 DUP2 PUSH2 0xB75 JUMP JUMPDEST ISZERO PUSH2 0x127E JUMPI PUSH1 0x40 DUP1 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x12 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x54585F46554C4C595F434F4E4649524D45440000000000000000000000000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 DUP1 DUP5 KECCAK256 CALLER DUP1 DUP7 MSTORE SWAP3 MSTORE DUP1 DUP5 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND SWAP1 SWAP4 OR SWAP1 SWAP3 SSTORE SWAP1 MLOAD DUP9 SWAP3 PUSH32 0x4A504A94899432A9846E1AA406DCEB1BCFD538BB839071D49D1E5E23F5BE30EF SWAP2 LOG3 PUSH2 0x12F2 DUP7 PUSH2 0xB75 JUMP JUMPDEST ISZERO PUSH2 0x1301 JUMPI PUSH2 0x1301 DUP7 TIMESTAMP PUSH2 0x181A JUMP JUMPDEST POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1316 DUP5 DUP5 DUP5 PUSH2 0x1865 JUMP JUMPDEST SWAP1 POP PUSH2 0x1321 DUP2 PUSH2 0x118D JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x7 PUSH1 0x20 MSTORE PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x32 DUP2 JUMP JUMPDEST PUSH1 0x4 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 CALLER ADDRESS EQ PUSH2 0x1353 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP4 SWAP1 PUSH1 0xFF AND ISZERO ISZERO PUSH2 0x1389 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP4 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x13BE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 SWAP3 POP JUMPDEST PUSH1 0x3 SLOAD DUP4 LT ISZERO PUSH2 0x1483 JUMPI DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x3 DUP5 DUP2 SLOAD DUP2 LT ISZERO ISZERO PUSH2 0x13F3 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO PUSH2 0x1478 JUMPI DUP4 PUSH1 0x3 DUP5 DUP2 SLOAD DUP2 LT ISZERO ISZERO PUSH2 0x142B JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP PUSH2 0x1483 JUMP JUMPDEST PUSH1 0x1 SWAP1 SWAP3 ADD SWAP2 PUSH2 0x13C3 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP7 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 SWAP1 DUP2 AND SWAP1 SWAP2 SSTORE SWAP4 DUP9 AND DUP3 MSTORE DUP1 DUP3 KECCAK256 DUP1 SLOAD SWAP1 SWAP5 AND PUSH1 0x1 OR SWAP1 SWAP4 SSTORE SWAP2 MLOAD SWAP1 SWAP2 PUSH32 0x8001553A916EF2F495D26A907CC54D96ED840D7BDA71E73194BF5A9DF7A76B90 SWAP2 LOG2 PUSH1 0x40 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP6 AND SWAP1 PUSH32 0xF39E6E1EB0EDCF53C221607B54B00CD28F3196FED0A24994DC308B8F611B682D SWAP1 PUSH1 0x0 SWAP1 LOG2 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH1 0x3 ADD SLOAD DUP3 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x1576 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 PUSH2 0x1580 DUP2 PUSH2 0xB75 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x15ED JUMPI PUSH1 0x40 DUP1 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x16 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x54585F4E4F545F46554C4C595F434F4E4649524D454400000000000000000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0x6 SLOAD PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x7 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP6 SWAP2 ADD TIMESTAMP LT ISZERO PUSH2 0x1670 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x14 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x54494D455F4C4F434B5F494E434F4D504C455445000000000000000000000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 PUSH1 0x3 DUP2 ADD DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND PUSH1 0x1 SWAP1 DUP2 OR SWAP1 SWAP2 SSTORE DUP2 SLOAD DUP2 DUP4 ADD SLOAD PUSH1 0x2 DUP1 DUP6 ADD DUP1 SLOAD DUP9 MLOAD PUSH1 0x1F PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP8 DUP4 AND ISZERO PUSH2 0x100 MUL SWAP8 SWAP1 SWAP8 ADD SWAP1 SWAP2 AND SWAP3 SWAP1 SWAP3 DIV SWAP5 DUP6 ADD DUP8 SWAP1 DIV DUP8 MUL DUP3 ADD DUP8 ADD SWAP1 SWAP8 MSTORE DUP4 DUP2 MSTORE SWAP4 SWAP10 POP PUSH2 0x1788 SWAP6 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP3 AND SWAP5 SWAP1 SWAP4 SWAP2 SWAP1 DUP4 SWAP1 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x177E JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x1753 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x177E JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x1761 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP PUSH2 0x1998 JUMP JUMPDEST ISZERO PUSH2 0x17BD JUMPI PUSH1 0x40 MLOAD DUP6 SWAP1 PUSH32 0x33E13ECB54C3076D8E8BB8C2881800A4D972B792045FFAE98FDF46DF365FED75 SWAP1 PUSH1 0x0 SWAP1 LOG2 PUSH2 0x1813 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP6 SWAP1 PUSH32 0x526441BB6C1ABA3C9A4A6CA1D6545DA9C2333C8C48343EF398EB858D72B79236 SWAP1 PUSH1 0x0 SWAP1 LOG2 PUSH1 0x3 DUP5 ADD DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND SWAP1 SSTORE JUMPDEST POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x7 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 DUP4 SWAP1 SSTORE DUP2 MLOAD DUP4 DUP2 MSTORE SWAP2 MLOAD DUP5 SWAP3 PUSH32 0xB237AFE65F1514FD7EA3F923EA4FE792BDD07000A912B6CD1602A8E7F573C8D SWAP3 SWAP1 DUP3 SWAP1 SUB ADD SWAP1 LOG2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND ISZERO ISZERO PUSH2 0x188A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x5 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x80 DUP2 ADD DUP3 MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP9 DUP2 AND DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 ADD DUP10 DUP2 MSTORE DUP4 DUP6 ADD DUP10 DUP2 MSTORE PUSH1 0x0 PUSH1 0x60 DUP7 ADD DUP2 SWAP1 MSTORE DUP8 DUP2 MSTORE DUP1 DUP5 MSTORE SWAP6 SWAP1 SWAP6 KECCAK256 DUP5 MLOAD DUP2 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND SWAP5 AND SWAP4 SWAP1 SWAP4 OR DUP4 SSTORE MLOAD PUSH1 0x1 DUP4 ADD SSTORE SWAP3 MLOAD DUP1 MLOAD SWAP5 SWAP7 POP SWAP2 SWAP4 SWAP1 SWAP3 PUSH2 0x1922 SWAP3 PUSH1 0x2 DUP6 ADD SWAP3 SWAP2 ADD SWAP1 PUSH2 0x19E4 JUMP JUMPDEST POP PUSH1 0x60 SWAP2 SWAP1 SWAP2 ADD MLOAD PUSH1 0x3 SWAP1 SWAP2 ADD DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND SWAP2 ISZERO ISZERO SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE PUSH1 0x5 DUP1 SLOAD PUSH1 0x1 ADD SWAP1 SSTORE PUSH1 0x40 MLOAD DUP3 SWAP1 PUSH32 0xC0BA8FE4B176C1714197D43B9CC6BCF797A4A7461C5FE8D0EF6E184AE7601E51 SWAP1 PUSH1 0x0 SWAP1 LOG2 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 MLOAD PUSH1 0x20 DUP5 ADD PUSH1 0x0 DUP3 DUP8 DUP4 DUP11 DUP13 PUSH2 0x8796 GAS SUB CALL SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST DUP2 SLOAD DUP2 DUP4 SSTORE DUP2 DUP2 GT ISZERO PUSH2 0x19DF JUMPI PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x20 SWAP1 KECCAK256 PUSH2 0x19DF SWAP2 DUP2 ADD SWAP1 DUP4 ADD PUSH2 0x1A62 JUMP JUMPDEST POP POP POP JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH1 0x1F LT PUSH2 0x1A25 JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH2 0x1A52 JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH2 0x1A52 JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0x1A52 JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0x1A37 JUMP JUMPDEST POP PUSH2 0x1A5E SWAP3 SWAP2 POP PUSH2 0x1A62 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST PUSH2 0xE1F SWAP2 SWAP1 JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x1A5E JUMPI PUSH1 0x0 DUP2 SSTORE PUSH1 0x1 ADD PUSH2 0x1A68 JUMP STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 0xe5 0xba 0xbe 0xc1 MOD LT 0xb2 0xcd PUSH5 0x68FA63C48E PUSH10 0xCDAD30621A7C94440138 PUSH11 0xF3715285734E0029000000 ",
                "sourceMap": "851:3344:17:-;;;2064:226;8:9:-1;5:2;;;30:1;27;20:12;5:2;2064:226:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;2934:14:16;;2064:226:17;;;;;;;2980:6:16;;2064:226:17;839:2:16;2273:29;;;;;:68;;;2331:10;2318:9;:23;;2273:68;:98;;;;-1:-1:-1;2357:14:16;;;2273:98;:129;;;;-1:-1:-1;2387:15:16;;;2273:129;2265:138;;;;;;;;2987:1;2980:8;;2975:151;2992:7;:14;2990:1;:16;2975:151;;;3036:7;:19;3044:7;3052:1;3044:10;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3036:19:16;;;;;;;;;;;-1:-1:-1;3036:19:16;;;;3035:20;:39;;;;;3059:7;3067:1;3059:10;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3059:15:16;3073:1;3059:15;;3035:39;3027:48;;;;;;;;3111:4;3089:7;:19;3097:7;3105:1;3097:10;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3089:19:16;;;;;;;;;;;-1:-1:-1;3089:19:16;:26;;-1:-1:-1;;3089:26:16;;;;;;;;;;-1:-1:-1;3008:3:16;;;;;2975:151;;;3135:16;;;;:6;;:16;;;;;:::i;:::-;-1:-1:-1;;;3161:8:16;:20;;;;-1:-1:-1;;2245:17:17;:38;-1:-1:-1;851:3344:17;;-1:-1:-1;851:3344:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;851:3344:17;-1:-1:-1;;;;;851:3344:17;;;;;;;;;;;-1:-1:-1;851:3344:17;;;;;;;-1:-1:-1;851:3344:17;;;-1:-1:-1;851:3344:17;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;-1:-1:-1;;;;;;851:3344:17;;;;;;;;;:::o;:::-;;;;;;;"
            },
            "deployedBytecode": {
                "linkReferences": {},
                "object": "0x60806040526004361061013d5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663025e7c27811461017f578063173825d9146101c057806320ea8d86146101ee5780632f54bf6e146102065780633411c81c1461024857806337bd78a01461027957806354741525146102a05780637065cb48146102bf578063784547a7146102ed5780637ad28c51146103055780638b51d13f1461031d5780639ace38c214610335578063a0e67e2b1461040a578063a8abe69a1461046f578063b5dc40c314610494578063b77bf600146104ac578063ba51a6df146104c1578063c01a8c84146104d9578063c6427474146104f1578063d38f2d8214610567578063d74f8edd1461057f578063dc8452cd14610594578063e20056e6146105a9578063ee22610b146105dd575b600034111561017d5760408051348152905133917fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c919081900360200190a25b005b34801561018b57600080fd5b506101976004356105f5565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156101cc57600080fd5b5061017d73ffffffffffffffffffffffffffffffffffffffff6004351661062a565b3480156101fa57600080fd5b5061017d600435610881565b34801561021257600080fd5b5061023473ffffffffffffffffffffffffffffffffffffffff60043516610959565b604080519115158252519081900360200190f35b34801561025457600080fd5b5061023460043573ffffffffffffffffffffffffffffffffffffffff6024351661096e565b34801561028557600080fd5b5061028e61098e565b60408051918252519081900360200190f35b3480156102ac57600080fd5b5061028e60043515156024351515610994565b3480156102cb57600080fd5b5061017d73ffffffffffffffffffffffffffffffffffffffff60043516610a00565b3480156102f957600080fd5b50610234600435610b75565b34801561031157600080fd5b5061017d600435610c06565b34801561032957600080fd5b5061028e600435610c4d565b34801561034157600080fd5b5061034d600435610cc9565b604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018060200183151515158152602001828103825284818151815260200191508051906020019080838360005b838110156103cc5781810151838201526020016103b4565b50505050905090810190601f1680156103f95780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b34801561041657600080fd5b5061041f610db2565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561045b578181015183820152602001610443565b505050509050019250505060405180910390f35b34801561047b57600080fd5b5061041f60043560243560443515156064351515610e22565b3480156104a057600080fd5b5061041f600435610f5b565b3480156104b857600080fd5b5061028e611108565b3480156104cd57600080fd5b5061017d60043561110e565b3480156104e557600080fd5b5061017d60043561118d565b3480156104fd57600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845261028e94823573ffffffffffffffffffffffffffffffffffffffff169460248035953695946064949201919081908401838280828437509497506113099650505050505050565b34801561057357600080fd5b5061028e600435611328565b34801561058b57600080fd5b5061028e61133a565b3480156105a057600080fd5b5061028e61133f565b3480156105b557600080fd5b5061017d73ffffffffffffffffffffffffffffffffffffffff60043581169060243516611345565b3480156105e957600080fd5b5061017d600435611555565b600380548290811061060357fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b600033301461063857600080fd5b73ffffffffffffffffffffffffffffffffffffffff8216600090815260026020526040902054829060ff16151561066e57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260026020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905591505b6003547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018210156107f1578273ffffffffffffffffffffffffffffffffffffffff1660038381548110151561070e57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1614156107e657600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190811061076657fe5b6000918252602090912001546003805473ffffffffffffffffffffffffffffffffffffffff909216918490811061079957fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506107f1565b6001909101906106bc565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019061082290826119bb565b50600354600454111561083b5760035461083b9061110e565b60405173ffffffffffffffffffffffffffffffffffffffff8416907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a2505050565b3360008181526002602052604090205460ff16151561089f57600080fd5b60008281526001602090815260408083203380855292529091205483919060ff1615156108cb57600080fd5b600084815260208190526040902060030154849060ff16156108ec57600080fd5b600085815260016020908152604080832033808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b60026020526000908152604090205460ff1681565b600160209081526000928352604080842090915290825290205460ff1681565b60065481565b6000805b6005548110156109f9578380156109c1575060008181526020819052604090206003015460ff16155b806109e557508280156109e5575060008181526020819052604090206003015460ff165b156109f1576001820191505b600101610998565b5092915050565b333014610a0c57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116600090815260026020526040902054819060ff1615610a4157600080fd5b8173ffffffffffffffffffffffffffffffffffffffff81161515610a6457600080fd5b60038054905060010160045460328211158015610a815750818111155b8015610a8c57508015155b8015610a9757508115155b1515610aa257600080fd5b73ffffffffffffffffffffffffffffffffffffffff851660008181526002602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0180547fffffffffffffffffffffffff00000000000000000000000000000000000000001684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b600354811015610bff5760008481526001602052604081206003805491929184908110610ba357fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205460ff1615610be4576001820191505b600454821415610bf75760019250610bff565b600101610b7a565b5050919050565b333014610c1257600080fd5b60068190556040805182815290517fd1c9101a34feff75cccef14a28785a0279cb0b49c1f321f21f5f422e746b43779181900360200190a150565b6000805b600354811015610cc35760008381526001602052604081206003805491929184908110610c7a57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205460ff1615610cbb576001820191505b600101610c51565b50919050565b60006020818152918152604090819020805460018083015460028085018054875161010095821615959095027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff011691909104601f810188900488028401880190965285835273ffffffffffffffffffffffffffffffffffffffff90931695909491929190830182828015610d9f5780601f10610d7457610100808354040283529160200191610d9f565b820191906000526020600020905b815481529060010190602001808311610d8257829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610e1757602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610dec575b505050505090505b90565b606080600080600554604051908082528060200260200182016040528015610e54578160200160208202803883390190505b50925060009150600090505b600554811015610edb57858015610e89575060008181526020819052604090206003015460ff16155b80610ead5750848015610ead575060008181526020819052604090206003015460ff165b15610ed357808383815181101515610ec157fe5b60209081029091010152600191909101905b600101610e60565b878703604051908082528060200260200182016040528015610f07578160200160208202803883390190505b5093508790505b86811015610f50578281815181101515610f2457fe5b9060200190602002015184898303815181101515610f3e57fe5b60209081029091010152600101610f0e565b505050949350505050565b606080600080600380549050604051908082528060200260200182016040528015610f90578160200160208202803883390190505b50925060009150600090505b6003548110156110745760008581526001602052604081206003805491929184908110610fc557fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205460ff161561106c57600380548290811061100d57fe5b600091825260209091200154835173ffffffffffffffffffffffffffffffffffffffff9091169084908490811061104057fe5b73ffffffffffffffffffffffffffffffffffffffff909216602092830290910190910152600191909101905b600101610f9c565b8160405190808252806020026020018201604052801561109e578160200160208202803883390190505b509350600090505b818110156111005782818151811015156110bc57fe5b9060200190602002015184828151811015156110d457fe5b73ffffffffffffffffffffffffffffffffffffffff9092166020928302909101909101526001016110a6565b505050919050565b60055481565b33301461111a57600080fd5b600354816032821180159061112f5750818111155b801561113a57508015155b801561114557508115155b151561115057600080fd5b60048390556040805184815290517fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9181900360200190a1505050565b3360008181526002602052604090205460ff1615156111ab57600080fd5b600082815260208190526040902054829073ffffffffffffffffffffffffffffffffffffffff1615156111dd57600080fd5b60008381526001602090815260408083203380855292529091205484919060ff161561120857600080fd5b8461121281610b75565b1561127e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f54585f46554c4c595f434f4e4649524d45440000000000000000000000000000604482015290519081900360640190fd5b600086815260016020818152604080842033808652925280842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016909317909255905188927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a36112f286610b75565b1561130157611301864261181a565b505050505050565b6000611316848484611865565b90506113218161118d565b9392505050565b60076020526000908152604090205481565b603281565b60045481565b600033301461135357600080fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260026020526040902054839060ff16151561138957600080fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260026020526040902054839060ff16156113be57600080fd5b600092505b600354831015611483578473ffffffffffffffffffffffffffffffffffffffff166003848154811015156113f357fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff161415611478578360038481548110151561142b57fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611483565b6001909201916113c3565b73ffffffffffffffffffffffffffffffffffffffff80861660008181526002602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0090811690915593881682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a260405173ffffffffffffffffffffffffffffffffffffffff8516907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a25050505050565b600081815260208190526040812060030154829060ff161561157657600080fd5b8261158081610b75565b15156115ed57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f54585f4e4f545f46554c4c595f434f4e4649524d454400000000000000000000604482015290519081900360640190fd5b60065460008581526007602052604090205485910142101561167057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f54494d455f4c4f434b5f494e434f4d504c455445000000000000000000000000604482015290519081900360640190fd5b600085815260208181526040918290206003810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815481830154600280850180548851601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff978316156101000297909701909116929092049485018790048702820187019097528381529399506117889573ffffffffffffffffffffffffffffffffffffffff9092169490939190839083018282801561177e5780601f106117535761010080835404028352916020019161177e565b820191906000526020600020905b81548152906001019060200180831161176157829003601f168201915b5050505050611998565b156117bd5760405185907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a2611813565b60405185907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a26003840180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555b5050505050565b6000828152600760209081526040918290208390558151838152915184927f0b237afe65f1514fd7ea3f923ea4fe792bdd07000a912b6cd1602a8e7f573c8d92908290030190a25050565b60008373ffffffffffffffffffffffffffffffffffffffff8116151561188a57600080fd5b6005546040805160808101825273ffffffffffffffffffffffffffffffffffffffff8881168252602080830189815283850189815260006060860181905287815280845295909520845181547fffffffffffffffffffffffff000000000000000000000000000000000000000016941693909317835551600183015592518051949650919390926119229260028501929101906119e4565b5060609190910151600390910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905560058054600101905560405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b6000806040516020840160008287838a8c6187965a03f198975050505050505050565b8154818355818111156119df576000838152602090206119df918101908301611a62565b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611a2557805160ff1916838001178555611a52565b82800160010185558215611a52579182015b82811115611a52578251825591602001919060010190611a37565b50611a5e929150611a62565b5090565b610e1f91905b80821115611a5e5760008155600101611a685600a165627a7a72305820e5babec10610b2cd6468fa63c48e69cdad30621a7c944401386af3715285734e0029",
                "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x13D JUMPI PUSH4 0xFFFFFFFF PUSH29 0x100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0x25E7C27 DUP2 EQ PUSH2 0x17F JUMPI DUP1 PUSH4 0x173825D9 EQ PUSH2 0x1C0 JUMPI DUP1 PUSH4 0x20EA8D86 EQ PUSH2 0x1EE JUMPI DUP1 PUSH4 0x2F54BF6E EQ PUSH2 0x206 JUMPI DUP1 PUSH4 0x3411C81C EQ PUSH2 0x248 JUMPI DUP1 PUSH4 0x37BD78A0 EQ PUSH2 0x279 JUMPI DUP1 PUSH4 0x54741525 EQ PUSH2 0x2A0 JUMPI DUP1 PUSH4 0x7065CB48 EQ PUSH2 0x2BF JUMPI DUP1 PUSH4 0x784547A7 EQ PUSH2 0x2ED JUMPI DUP1 PUSH4 0x7AD28C51 EQ PUSH2 0x305 JUMPI DUP1 PUSH4 0x8B51D13F EQ PUSH2 0x31D JUMPI DUP1 PUSH4 0x9ACE38C2 EQ PUSH2 0x335 JUMPI DUP1 PUSH4 0xA0E67E2B EQ PUSH2 0x40A JUMPI DUP1 PUSH4 0xA8ABE69A EQ PUSH2 0x46F JUMPI DUP1 PUSH4 0xB5DC40C3 EQ PUSH2 0x494 JUMPI DUP1 PUSH4 0xB77BF600 EQ PUSH2 0x4AC JUMPI DUP1 PUSH4 0xBA51A6DF EQ PUSH2 0x4C1 JUMPI DUP1 PUSH4 0xC01A8C84 EQ PUSH2 0x4D9 JUMPI DUP1 PUSH4 0xC6427474 EQ PUSH2 0x4F1 JUMPI DUP1 PUSH4 0xD38F2D82 EQ PUSH2 0x567 JUMPI DUP1 PUSH4 0xD74F8EDD EQ PUSH2 0x57F JUMPI DUP1 PUSH4 0xDC8452CD EQ PUSH2 0x594 JUMPI DUP1 PUSH4 0xE20056E6 EQ PUSH2 0x5A9 JUMPI DUP1 PUSH4 0xEE22610B EQ PUSH2 0x5DD JUMPI JUMPDEST PUSH1 0x0 CALLVALUE GT ISZERO PUSH2 0x17D JUMPI PUSH1 0x40 DUP1 MLOAD CALLVALUE DUP2 MSTORE SWAP1 MLOAD CALLER SWAP2 PUSH32 0xE1FFFCC4923D04B559F4D29A8BFC6CDA04EB5B0D3C460751C2402C5C5CC9109C SWAP2 SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 LOG2 JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x18B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x197 PUSH1 0x4 CALLDATALOAD PUSH2 0x5F5 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1CC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x17D PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH2 0x62A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1FA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x17D PUSH1 0x4 CALLDATALOAD PUSH2 0x881 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x212 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x234 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH2 0x959 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x254 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x234 PUSH1 0x4 CALLDATALOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x24 CALLDATALOAD AND PUSH2 0x96E JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x285 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x28E PUSH2 0x98E JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2AC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x28E PUSH1 0x4 CALLDATALOAD ISZERO ISZERO PUSH1 0x24 CALLDATALOAD ISZERO ISZERO PUSH2 0x994 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2CB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x17D PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH2 0xA00 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2F9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x234 PUSH1 0x4 CALLDATALOAD PUSH2 0xB75 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x311 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x17D PUSH1 0x4 CALLDATALOAD PUSH2 0xC06 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x329 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x28E PUSH1 0x4 CALLDATALOAD PUSH2 0xC4D JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x341 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x34D PUSH1 0x4 CALLDATALOAD PUSH2 0xCC9 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP6 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP4 ISZERO ISZERO ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP5 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x3CC JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x3B4 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x3F9 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP6 POP POP POP POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x416 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x41F PUSH2 0xDB2 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 DUP2 ADD SWAP2 MUL DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x45B JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x443 JUMP JUMPDEST POP POP POP POP SWAP1 POP ADD SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x47B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x41F PUSH1 0x4 CALLDATALOAD PUSH1 0x24 CALLDATALOAD PUSH1 0x44 CALLDATALOAD ISZERO ISZERO PUSH1 0x64 CALLDATALOAD ISZERO ISZERO PUSH2 0xE22 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x4A0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x41F PUSH1 0x4 CALLDATALOAD PUSH2 0xF5B JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x4B8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x28E PUSH2 0x1108 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x4CD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x17D PUSH1 0x4 CALLDATALOAD PUSH2 0x110E JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x4E5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x17D PUSH1 0x4 CALLDATALOAD PUSH2 0x118D JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x4FD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x4 PUSH1 0x44 CALLDATALOAD DUP2 DUP2 ADD CALLDATALOAD PUSH1 0x1F DUP2 ADD DUP5 SWAP1 DIV DUP5 MUL DUP6 ADD DUP5 ADD SWAP1 SWAP6 MSTORE DUP5 DUP5 MSTORE PUSH2 0x28E SWAP5 DUP3 CALLDATALOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP5 PUSH1 0x24 DUP1 CALLDATALOAD SWAP6 CALLDATASIZE SWAP6 SWAP5 PUSH1 0x64 SWAP5 SWAP3 ADD SWAP2 SWAP1 DUP2 SWAP1 DUP5 ADD DUP4 DUP3 DUP1 DUP3 DUP5 CALLDATACOPY POP SWAP5 SWAP8 POP PUSH2 0x1309 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x573 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x28E PUSH1 0x4 CALLDATALOAD PUSH2 0x1328 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x58B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x28E PUSH2 0x133A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x5A0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x28E PUSH2 0x133F JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x5B5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x17D PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD DUP2 AND SWAP1 PUSH1 0x24 CALLDATALOAD AND PUSH2 0x1345 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x5E9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x17D PUSH1 0x4 CALLDATALOAD PUSH2 0x1555 JUMP JUMPDEST PUSH1 0x3 DUP1 SLOAD DUP3 SWAP1 DUP2 LT PUSH2 0x603 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 POP DUP2 JUMP JUMPDEST PUSH1 0x0 CALLER ADDRESS EQ PUSH2 0x638 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP3 SWAP1 PUSH1 0xFF AND ISZERO ISZERO PUSH2 0x66E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND SWAP1 SSTORE SWAP2 POP JUMPDEST PUSH1 0x3 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ADD DUP3 LT ISZERO PUSH2 0x7F1 JUMPI DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x3 DUP4 DUP2 SLOAD DUP2 LT ISZERO ISZERO PUSH2 0x70E JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO PUSH2 0x7E6 JUMPI PUSH1 0x3 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 ADD SWAP1 DUP2 LT PUSH2 0x766 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH1 0x3 DUP1 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP3 AND SWAP2 DUP5 SWAP1 DUP2 LT PUSH2 0x799 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP PUSH2 0x7F1 JUMP JUMPDEST PUSH1 0x1 SWAP1 SWAP2 ADD SWAP1 PUSH2 0x6BC JUMP JUMPDEST PUSH1 0x3 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ADD SWAP1 PUSH2 0x822 SWAP1 DUP3 PUSH2 0x19BB JUMP JUMPDEST POP PUSH1 0x3 SLOAD PUSH1 0x4 SLOAD GT ISZERO PUSH2 0x83B JUMPI PUSH1 0x3 SLOAD PUSH2 0x83B SWAP1 PUSH2 0x110E JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP5 AND SWAP1 PUSH32 0x8001553A916EF2F495D26A907CC54D96ED840D7BDA71E73194BF5A9DF7A76B90 SWAP1 PUSH1 0x0 SWAP1 LOG2 POP POP POP JUMP JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO ISZERO PUSH2 0x89F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP3 MSTORE SWAP1 SWAP2 KECCAK256 SLOAD DUP4 SWAP2 SWAP1 PUSH1 0xFF AND ISZERO ISZERO PUSH2 0x8CB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x3 ADD SLOAD DUP5 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x8EC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP3 MSTORE DUP1 DUP4 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND SWAP1 SSTORE MLOAD DUP8 SWAP3 PUSH32 0xF6A317157440607F36269043EB55F1287A5A19BA2216AFEAB88CD46CBCFB88E9 SWAP2 LOG3 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND DUP2 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x0 SWAP3 DUP4 MSTORE PUSH1 0x40 DUP1 DUP5 KECCAK256 SWAP1 SWAP2 MSTORE SWAP1 DUP3 MSTORE SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND DUP2 JUMP JUMPDEST PUSH1 0x6 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 JUMPDEST PUSH1 0x5 SLOAD DUP2 LT ISZERO PUSH2 0x9F9 JUMPI DUP4 DUP1 ISZERO PUSH2 0x9C1 JUMPI POP PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x3 ADD SLOAD PUSH1 0xFF AND ISZERO JUMPDEST DUP1 PUSH2 0x9E5 JUMPI POP DUP3 DUP1 ISZERO PUSH2 0x9E5 JUMPI POP PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x3 ADD SLOAD PUSH1 0xFF AND JUMPDEST ISZERO PUSH2 0x9F1 JUMPI PUSH1 0x1 DUP3 ADD SWAP2 POP JUMPDEST PUSH1 0x1 ADD PUSH2 0x998 JUMP JUMPDEST POP SWAP3 SWAP2 POP POP JUMP JUMPDEST CALLER ADDRESS EQ PUSH2 0xA0C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP2 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0xA41 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND ISZERO ISZERO PUSH2 0xA64 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 DUP1 SLOAD SWAP1 POP PUSH1 0x1 ADD PUSH1 0x4 SLOAD PUSH1 0x32 DUP3 GT ISZERO DUP1 ISZERO PUSH2 0xA81 JUMPI POP DUP2 DUP2 GT ISZERO JUMPDEST DUP1 ISZERO PUSH2 0xA8C JUMPI POP DUP1 ISZERO ISZERO JUMPDEST DUP1 ISZERO PUSH2 0xA97 JUMPI POP DUP2 ISZERO ISZERO JUMPDEST ISZERO ISZERO PUSH2 0xAA2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP6 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND PUSH1 0x1 SWAP1 DUP2 OR SWAP1 SWAP2 SSTORE PUSH1 0x3 DUP1 SLOAD SWAP2 DUP3 ADD DUP2 SSTORE DUP4 MSTORE PUSH32 0xC2575A0E9E593C00F959F8C92F12DB2869C3395A3B0502D05E2516446F71F85B ADD DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND DUP5 OR SWAP1 SSTORE MLOAD PUSH32 0xF39E6E1EB0EDCF53C221607B54B00CD28F3196FED0A24994DC308B8F611B682D SWAP2 SWAP1 LOG2 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP1 JUMPDEST PUSH1 0x3 SLOAD DUP2 LT ISZERO PUSH2 0xBFF JUMPI PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH1 0x3 DUP1 SLOAD SWAP2 SWAP3 SWAP2 DUP5 SWAP1 DUP2 LT PUSH2 0xBA3 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 KECCAK256 SWAP1 SWAP2 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 MSTORE DUP3 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x40 ADD SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0xBE4 JUMPI PUSH1 0x1 DUP3 ADD SWAP2 POP JUMPDEST PUSH1 0x4 SLOAD DUP3 EQ ISZERO PUSH2 0xBF7 JUMPI PUSH1 0x1 SWAP3 POP PUSH2 0xBFF JUMP JUMPDEST PUSH1 0x1 ADD PUSH2 0xB7A JUMP JUMPDEST POP POP SWAP2 SWAP1 POP JUMP JUMPDEST CALLER ADDRESS EQ PUSH2 0xC12 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x6 DUP2 SWAP1 SSTORE PUSH1 0x40 DUP1 MLOAD DUP3 DUP2 MSTORE SWAP1 MLOAD PUSH32 0xD1C9101A34FEFF75CCCEF14A28785A0279CB0B49C1F321F21F5F422E746B4377 SWAP2 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 LOG1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 JUMPDEST PUSH1 0x3 SLOAD DUP2 LT ISZERO PUSH2 0xCC3 JUMPI PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH1 0x3 DUP1 SLOAD SWAP2 SWAP3 SWAP2 DUP5 SWAP1 DUP2 LT PUSH2 0xC7A JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 KECCAK256 SWAP1 SWAP2 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 MSTORE DUP3 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x40 ADD SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0xCBB JUMPI PUSH1 0x1 DUP3 ADD SWAP2 POP JUMPDEST PUSH1 0x1 ADD PUSH2 0xC51 JUMP JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP2 DUP2 MSTORE SWAP2 DUP2 MSTORE PUSH1 0x40 SWAP1 DUP2 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0x1 DUP1 DUP4 ADD SLOAD PUSH1 0x2 DUP1 DUP6 ADD DUP1 SLOAD DUP8 MLOAD PUSH2 0x100 SWAP6 DUP3 AND ISZERO SWAP6 SWAP1 SWAP6 MUL PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ADD AND SWAP2 SWAP1 SWAP2 DIV PUSH1 0x1F DUP2 ADD DUP9 SWAP1 DIV DUP9 MUL DUP5 ADD DUP9 ADD SWAP1 SWAP7 MSTORE DUP6 DUP4 MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP4 AND SWAP6 SWAP1 SWAP5 SWAP2 SWAP3 SWAP2 SWAP1 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0xD9F JUMPI DUP1 PUSH1 0x1F LT PUSH2 0xD74 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0xD9F JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0xD82 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP PUSH1 0x3 SWAP1 SWAP4 ADD SLOAD SWAP2 SWAP3 POP POP PUSH1 0xFF AND DUP5 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x3 DUP1 SLOAD DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD DUP1 ISZERO PUSH2 0xE17 JUMPI PUSH1 0x20 MUL DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x1 SWAP1 SWAP2 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0xDEC JUMPI JUMPDEST POP POP POP POP POP SWAP1 POP JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP1 PUSH1 0x0 DUP1 PUSH1 0x5 SLOAD PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xE54 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CODESIZE DUP4 CODECOPY ADD SWAP1 POP JUMPDEST POP SWAP3 POP PUSH1 0x0 SWAP2 POP PUSH1 0x0 SWAP1 POP JUMPDEST PUSH1 0x5 SLOAD DUP2 LT ISZERO PUSH2 0xEDB JUMPI DUP6 DUP1 ISZERO PUSH2 0xE89 JUMPI POP PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x3 ADD SLOAD PUSH1 0xFF AND ISZERO JUMPDEST DUP1 PUSH2 0xEAD JUMPI POP DUP5 DUP1 ISZERO PUSH2 0xEAD JUMPI POP PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x3 ADD SLOAD PUSH1 0xFF AND JUMPDEST ISZERO PUSH2 0xED3 JUMPI DUP1 DUP4 DUP4 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0xEC1 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 SWAP2 SWAP1 SWAP2 ADD SWAP1 JUMPDEST PUSH1 0x1 ADD PUSH2 0xE60 JUMP JUMPDEST DUP8 DUP8 SUB PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xF07 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CODESIZE DUP4 CODECOPY ADD SWAP1 POP JUMPDEST POP SWAP4 POP DUP8 SWAP1 POP JUMPDEST DUP7 DUP2 LT ISZERO PUSH2 0xF50 JUMPI DUP3 DUP2 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0xF24 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x20 ADD SWAP1 PUSH1 0x20 MUL ADD MLOAD DUP5 DUP10 DUP4 SUB DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0xF3E JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0xF0E JUMP JUMPDEST POP POP POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x60 DUP1 PUSH1 0x0 DUP1 PUSH1 0x3 DUP1 SLOAD SWAP1 POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xF90 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CODESIZE DUP4 CODECOPY ADD SWAP1 POP JUMPDEST POP SWAP3 POP PUSH1 0x0 SWAP2 POP PUSH1 0x0 SWAP1 POP JUMPDEST PUSH1 0x3 SLOAD DUP2 LT ISZERO PUSH2 0x1074 JUMPI PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH1 0x3 DUP1 SLOAD SWAP2 SWAP3 SWAP2 DUP5 SWAP1 DUP2 LT PUSH2 0xFC5 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 KECCAK256 SWAP1 SWAP2 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 MSTORE DUP3 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x40 ADD SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x106C JUMPI PUSH1 0x3 DUP1 SLOAD DUP3 SWAP1 DUP2 LT PUSH2 0x100D JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD DUP4 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP2 AND SWAP1 DUP5 SWAP1 DUP5 SWAP1 DUP2 LT PUSH2 0x1040 JUMPI INVALID JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP3 AND PUSH1 0x20 SWAP3 DUP4 MUL SWAP1 SWAP2 ADD SWAP1 SWAP2 ADD MSTORE PUSH1 0x1 SWAP2 SWAP1 SWAP2 ADD SWAP1 JUMPDEST PUSH1 0x1 ADD PUSH2 0xF9C JUMP JUMPDEST DUP2 PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x109E JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CODESIZE DUP4 CODECOPY ADD SWAP1 POP JUMPDEST POP SWAP4 POP PUSH1 0x0 SWAP1 POP JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x1100 JUMPI DUP3 DUP2 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0x10BC JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x20 ADD SWAP1 PUSH1 0x20 MUL ADD MLOAD DUP5 DUP3 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0x10D4 JUMPI INVALID JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP3 AND PUSH1 0x20 SWAP3 DUP4 MUL SWAP1 SWAP2 ADD SWAP1 SWAP2 ADD MSTORE PUSH1 0x1 ADD PUSH2 0x10A6 JUMP JUMPDEST POP POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x5 SLOAD DUP2 JUMP JUMPDEST CALLER ADDRESS EQ PUSH2 0x111A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 SLOAD DUP2 PUSH1 0x32 DUP3 GT DUP1 ISZERO SWAP1 PUSH2 0x112F JUMPI POP DUP2 DUP2 GT ISZERO JUMPDEST DUP1 ISZERO PUSH2 0x113A JUMPI POP DUP1 ISZERO ISZERO JUMPDEST DUP1 ISZERO PUSH2 0x1145 JUMPI POP DUP2 ISZERO ISZERO JUMPDEST ISZERO ISZERO PUSH2 0x1150 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x4 DUP4 SWAP1 SSTORE PUSH1 0x40 DUP1 MLOAD DUP5 DUP2 MSTORE SWAP1 MLOAD PUSH32 0xA3F1EE9126A074D9326C682F561767F710E927FAA811F7A99829D49DC421797A SWAP2 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 LOG1 POP POP POP JUMP JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO ISZERO PUSH2 0x11AB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP3 SWAP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND ISZERO ISZERO PUSH2 0x11DD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP3 MSTORE SWAP1 SWAP2 KECCAK256 SLOAD DUP5 SWAP2 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x1208 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP5 PUSH2 0x1212 DUP2 PUSH2 0xB75 JUMP JUMPDEST ISZERO PUSH2 0x127E JUMPI PUSH1 0x40 DUP1 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x12 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x54585F46554C4C595F434F4E4649524D45440000000000000000000000000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 DUP1 DUP5 KECCAK256 CALLER DUP1 DUP7 MSTORE SWAP3 MSTORE DUP1 DUP5 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND SWAP1 SWAP4 OR SWAP1 SWAP3 SSTORE SWAP1 MLOAD DUP9 SWAP3 PUSH32 0x4A504A94899432A9846E1AA406DCEB1BCFD538BB839071D49D1E5E23F5BE30EF SWAP2 LOG3 PUSH2 0x12F2 DUP7 PUSH2 0xB75 JUMP JUMPDEST ISZERO PUSH2 0x1301 JUMPI PUSH2 0x1301 DUP7 TIMESTAMP PUSH2 0x181A JUMP JUMPDEST POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1316 DUP5 DUP5 DUP5 PUSH2 0x1865 JUMP JUMPDEST SWAP1 POP PUSH2 0x1321 DUP2 PUSH2 0x118D JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x7 PUSH1 0x20 MSTORE PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x32 DUP2 JUMP JUMPDEST PUSH1 0x4 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 CALLER ADDRESS EQ PUSH2 0x1353 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP4 SWAP1 PUSH1 0xFF AND ISZERO ISZERO PUSH2 0x1389 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP4 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x13BE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 SWAP3 POP JUMPDEST PUSH1 0x3 SLOAD DUP4 LT ISZERO PUSH2 0x1483 JUMPI DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x3 DUP5 DUP2 SLOAD DUP2 LT ISZERO ISZERO PUSH2 0x13F3 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO PUSH2 0x1478 JUMPI DUP4 PUSH1 0x3 DUP5 DUP2 SLOAD DUP2 LT ISZERO ISZERO PUSH2 0x142B JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP PUSH2 0x1483 JUMP JUMPDEST PUSH1 0x1 SWAP1 SWAP3 ADD SWAP2 PUSH2 0x13C3 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP7 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 SWAP1 DUP2 AND SWAP1 SWAP2 SSTORE SWAP4 DUP9 AND DUP3 MSTORE DUP1 DUP3 KECCAK256 DUP1 SLOAD SWAP1 SWAP5 AND PUSH1 0x1 OR SWAP1 SWAP4 SSTORE SWAP2 MLOAD SWAP1 SWAP2 PUSH32 0x8001553A916EF2F495D26A907CC54D96ED840D7BDA71E73194BF5A9DF7A76B90 SWAP2 LOG2 PUSH1 0x40 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP6 AND SWAP1 PUSH32 0xF39E6E1EB0EDCF53C221607B54B00CD28F3196FED0A24994DC308B8F611B682D SWAP1 PUSH1 0x0 SWAP1 LOG2 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH1 0x3 ADD SLOAD DUP3 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x1576 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 PUSH2 0x1580 DUP2 PUSH2 0xB75 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x15ED JUMPI PUSH1 0x40 DUP1 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x16 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x54585F4E4F545F46554C4C595F434F4E4649524D454400000000000000000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0x6 SLOAD PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x7 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP6 SWAP2 ADD TIMESTAMP LT ISZERO PUSH2 0x1670 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x14 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x54494D455F4C4F434B5F494E434F4D504C455445000000000000000000000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 PUSH1 0x3 DUP2 ADD DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND PUSH1 0x1 SWAP1 DUP2 OR SWAP1 SWAP2 SSTORE DUP2 SLOAD DUP2 DUP4 ADD SLOAD PUSH1 0x2 DUP1 DUP6 ADD DUP1 SLOAD DUP9 MLOAD PUSH1 0x1F PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP8 DUP4 AND ISZERO PUSH2 0x100 MUL SWAP8 SWAP1 SWAP8 ADD SWAP1 SWAP2 AND SWAP3 SWAP1 SWAP3 DIV SWAP5 DUP6 ADD DUP8 SWAP1 DIV DUP8 MUL DUP3 ADD DUP8 ADD SWAP1 SWAP8 MSTORE DUP4 DUP2 MSTORE SWAP4 SWAP10 POP PUSH2 0x1788 SWAP6 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP3 AND SWAP5 SWAP1 SWAP4 SWAP2 SWAP1 DUP4 SWAP1 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x177E JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x1753 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x177E JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x1761 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP PUSH2 0x1998 JUMP JUMPDEST ISZERO PUSH2 0x17BD JUMPI PUSH1 0x40 MLOAD DUP6 SWAP1 PUSH32 0x33E13ECB54C3076D8E8BB8C2881800A4D972B792045FFAE98FDF46DF365FED75 SWAP1 PUSH1 0x0 SWAP1 LOG2 PUSH2 0x1813 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP6 SWAP1 PUSH32 0x526441BB6C1ABA3C9A4A6CA1D6545DA9C2333C8C48343EF398EB858D72B79236 SWAP1 PUSH1 0x0 SWAP1 LOG2 PUSH1 0x3 DUP5 ADD DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND SWAP1 SSTORE JUMPDEST POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x7 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 DUP4 SWAP1 SSTORE DUP2 MLOAD DUP4 DUP2 MSTORE SWAP2 MLOAD DUP5 SWAP3 PUSH32 0xB237AFE65F1514FD7EA3F923EA4FE792BDD07000A912B6CD1602A8E7F573C8D SWAP3 SWAP1 DUP3 SWAP1 SUB ADD SWAP1 LOG2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND ISZERO ISZERO PUSH2 0x188A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x5 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x80 DUP2 ADD DUP3 MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP9 DUP2 AND DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 ADD DUP10 DUP2 MSTORE DUP4 DUP6 ADD DUP10 DUP2 MSTORE PUSH1 0x0 PUSH1 0x60 DUP7 ADD DUP2 SWAP1 MSTORE DUP8 DUP2 MSTORE DUP1 DUP5 MSTORE SWAP6 SWAP1 SWAP6 KECCAK256 DUP5 MLOAD DUP2 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND SWAP5 AND SWAP4 SWAP1 SWAP4 OR DUP4 SSTORE MLOAD PUSH1 0x1 DUP4 ADD SSTORE SWAP3 MLOAD DUP1 MLOAD SWAP5 SWAP7 POP SWAP2 SWAP4 SWAP1 SWAP3 PUSH2 0x1922 SWAP3 PUSH1 0x2 DUP6 ADD SWAP3 SWAP2 ADD SWAP1 PUSH2 0x19E4 JUMP JUMPDEST POP PUSH1 0x60 SWAP2 SWAP1 SWAP2 ADD MLOAD PUSH1 0x3 SWAP1 SWAP2 ADD DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND SWAP2 ISZERO ISZERO SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE PUSH1 0x5 DUP1 SLOAD PUSH1 0x1 ADD SWAP1 SSTORE PUSH1 0x40 MLOAD DUP3 SWAP1 PUSH32 0xC0BA8FE4B176C1714197D43B9CC6BCF797A4A7461C5FE8D0EF6E184AE7601E51 SWAP1 PUSH1 0x0 SWAP1 LOG2 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 MLOAD PUSH1 0x20 DUP5 ADD PUSH1 0x0 DUP3 DUP8 DUP4 DUP11 DUP13 PUSH2 0x8796 GAS SUB CALL SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST DUP2 SLOAD DUP2 DUP4 SSTORE DUP2 DUP2 GT ISZERO PUSH2 0x19DF JUMPI PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x20 SWAP1 KECCAK256 PUSH2 0x19DF SWAP2 DUP2 ADD SWAP1 DUP4 ADD PUSH2 0x1A62 JUMP JUMPDEST POP POP POP JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH1 0x1F LT PUSH2 0x1A25 JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH2 0x1A52 JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH2 0x1A52 JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0x1A52 JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0x1A37 JUMP JUMPDEST POP PUSH2 0x1A5E SWAP3 SWAP2 POP PUSH2 0x1A62 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST PUSH2 0xE1F SWAP2 SWAP1 JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x1A5E JUMPI PUSH1 0x0 DUP2 SSTORE PUSH1 0x1 ADD PUSH2 0x1A68 JUMP STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 0xe5 0xba 0xbe 0xc1 MOD LT 0xb2 0xcd PUSH5 0x68FA63C48E PUSH10 0xCDAD30621A7C94440138 PUSH11 0xF3715285734E0029000000 ",
                "sourceMap": "851:3344:17:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2540:1:16;2528:9;:13;2524:61;;;2555:30;;;2575:9;2555:30;;;;2563:10;;2555:30;;;;;;;;;;2524:61;851:3344:17;1050:23:16;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1050:23:16;;;;;;;;;;;;;;;;;;;;;;;;3715:460;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3715:460:16;;;;;;;6281:291;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;6281:291:16;;;;;1004:40;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1004:40:16;;;;;;;;;;;;;;;;;;;;;;;;;934:64;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;934:64:16;;;;;;;;;1057:32:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1057:32:17;;;;;;;;;;;;;;;;;;;;10535:319:16;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;10535:319:16;;;;;;;;;;;3315:277;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3315:277:16;;;;;;;8703:337;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;8703:337:16;;;;;2494:194:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2494:194:17;;;;;10021:252:16;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;10021:252:16;;;;;879:49;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;879:49:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;879:49:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10938:115;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10938:115:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;10938:115:16;;;;;;;;;;;;;;;;;12156:676;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;12156:676:16;;;;;;;;;;;;;;;11232:575;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;11232:575:16;;;;;1105:28;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1105:28:16;;;;4997:207;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4997:207:16;;;;;2794:467:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2794:467:17;;;;;5463:244:16;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;5463:244:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5463:244:16;;-1:-1:-1;5463:244:16;;-1:-1:-1;;;;;;;5463:244:16;1096:53:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1096:53:17;;;;;800:41:16;;8:9:-1;5:2;;;30:1;27;20:12;5:2;800:41:16;;;;1079:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1079:20:16;;;;4377:449;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4377:449:16;;;;;;;;;;;;3375:516:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3375:516:17;;;;;1050:23:16;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1050:23:16;:::o;3715:460::-;3863:6;1337:10;1359:4;1337:27;1329:36;;;;;;1543:14;;;;;;;:7;:14;;;;;;3805:5;;1543:14;;1535:23;;;;;;;;3826:14;;;3843:5;3826:14;;;:7;:14;;;;;:22;;;;;;3843:5;-1:-1:-1;3858:170:16;3875:6;:13;:17;;3873:19;;3858:170;;;3928:5;3915:18;;:6;3922:1;3915:9;;;;;;;;;;;;;;;;;;;;;;:18;3911:117;;;3965:6;3972:13;;:17;;;;3965:25;;;;;;;;;;;;;;;;3953:6;:9;;3965:25;;;;;3960:1;;3953:9;;;;;;;;;;;;;;:37;;;;;;;;;;;;;;;;;;4008:5;;3911:117;3894:3;;;;;3858:170;;;4037:6;:18;;;;;;;;;:::i;:::-;-1:-1:-1;4080:6:16;:13;4069:8;;:24;4065:74;;;4125:6;:13;4107:32;;:17;:32::i;:::-;4149:19;;;;;;;;;;;1375:1;3715:460;;:::o;6281:291::-;6364:10;1543:14;;;;:7;:14;;;;;;;;1535:23;;;;;;;;1788:28;;;;:13;:28;;;;;;;;6409:10;1788:35;;;;;;;;;6394:13;;6409:10;1788:35;;1780:44;;;;;;;;2044:12;:27;;;;;;;;;;:36;;;6441:13;;2044:36;;2043:37;2035:46;;;;;;6513:5;6470:28;;;:13;:28;;;;;;;;6499:10;6470:40;;;;;;;;:48;;;;;;6528:37;6484:13;;6528:37;;;1834:1;1568;;6281:291;;:::o;1004:40::-;;;;;;;;;;;;;;;:::o;934:64::-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1057:32:17:-;;;;:::o;10535:319:16:-;10642:10;;10668:179;10685:16;;10683:1;:18;10668:179;;;10727:7;:36;;;;-1:-1:-1;10739:12:16;:15;;;;;;;;;;:24;;;;;10738:25;10727:36;:92;;;;10783:8;:36;;;;-1:-1:-1;10795:12:16;:15;;;;;;;;;;:24;;;;;10783:36;10720:127;;;10846:1;10837:10;;;;10720:127;10703:3;;10668:179;;;10535:319;;;;;:::o;3315:277::-;1337:10;1359:4;1337:27;1329:36;;;;;;1450:14;;;;;;;:7;:14;;;;;;3408:5;;1450:14;;1449:15;1441:24;;;;;;3431:5;2158:13;;;;;2150:22;;;;;;3463:6;:13;;;;3479:1;3463:17;3482:8;;839:2;2273:10;:29;;:68;;;;;2331:10;2318:9;:23;;2273:68;:98;;;;-1:-1:-1;2357:14:16;;;2273:98;:129;;;;-1:-1:-1;2387:15:16;;;2273:129;2265:138;;;;;;;;3506:14;;;;;;;:7;:14;;;;;;:21;;;;3523:4;3506:21;;;;;;3537:6;27:10:-1;;23:18;;;45:23;;3537:18:16;;;;;;;;;;;;3565:20;;;3506:14;3565:20;2182:1;;1475;1375;3315:277;:::o;8703:337::-;8793:4;;;8837:197;8854:6;:13;8852:15;;8837:197;;;8892:28;;;;:13;:28;;;;;8921:6;:9;;8892:28;;;8928:1;;8921:9;;;;;;;;;;;;;;;;;;;;8892:39;;;;;;;;;;;;;;;8888:71;;;8958:1;8949:10;;;;8888:71;8986:8;;8977:5;:17;8973:50;;;9019:4;9012:11;;;;8973:50;8869:3;;8837:197;;;8703:337;;;;;:::o;2494:194:17:-;1337:10:16;1359:4;1337:27;1329:36;;;;;;2594:17:17;:38;;;2647:34;;;;;;;;;;;;;;;;;2494:194;:::o;10021:252:16:-;10120:10;;10146:120;10163:6;:13;10161:15;;10146:120;;;10199:28;;;;:13;:28;;;;;10228:6;:9;;10199:28;;;10235:1;;10228:9;;;;;;;;;;;;;;;;;;;;10199:39;;;;;;;;;;;;;;;10195:71;;;10265:1;10256:10;;;;10195:71;10178:3;;10146:120;;;10021:252;;;;:::o;879:49::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;879:49:16;;;;;;;-1:-1:-1;;879:49:16;;;:::o;10938:115::-;11008:9;11040:6;11033:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10938:115;;:::o;12156:676::-;12281:22;12319:32;12392:10;12416:6;12365:16;;12354:28;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;12354:28:16;;12319:63;;12405:1;12392:14;;12439:1;12437:3;;12432:250;12444:16;;12442:1;:18;12432:250;;;12486:7;:36;;;;-1:-1:-1;12498:12:16;:15;;;;;;;;;;:24;;;;;12497:25;12486:36;:92;;;;12542:8;:36;;;;-1:-1:-1;12554:12:16;:15;;;;;;;;;;:24;;;;;12542:36;12479:203;;;12638:1;12610:18;12629:5;12610:25;;;;;;;;;;;;;;;;;;:29;12666:1;12657:10;;;;;12479:203;12462:3;;12432:250;;;12725:4;12720:2;:9;12709:21;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;12709:21:16;;12691:39;;12747:4;12745:6;;12740:85;12755:2;12753:1;:4;12740:85;;;12804:18;12823:1;12804:21;;;;;;;;;;;;;;;;;;12776:15;12796:4;12792:1;:8;12776:25;;;;;;;;;;;;;;;;;;:49;12759:3;;12740:85;;;12156:676;;;;;;;;;:::o;11232:575::-;11327:24;11367:34;11442:10;11466:6;11418;:13;;;;11404:28;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;11404:28:16;;11367:65;;11455:1;11442:14;;11489:1;11487:3;;11482:186;11494:6;:13;11492:15;;11482:186;;;11530:28;;;;:13;:28;;;;;11559:6;:9;;11530:28;;;11566:1;;11559:9;;;;;;;;;;;;;;;;;;;;11530:39;;;;;;;;;;;;;;;11526:142;;;11616:6;:9;;11623:1;;11616:9;;;;;;;;;;;;;;;;11589:24;;11616:9;;;;;11589:17;;11607:5;;11589:24;;;;;;:36;;;;:24;;;;;;;;;;:36;11652:1;11643:10;;;;;11526:142;11509:3;;11482:186;;;11708:5;11694:20;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;11694:20:16;;11677:37;;11731:1;11729:3;;11724:76;11736:5;11734:1;:7;11724:76;;;11780:17;11798:1;11780:20;;;;;;;;;;;;;;;;;;11760:14;11775:1;11760:17;;;;;;;;;;:40;;;;:17;;;;;;;;;;:40;11743:3;;11724:76;;;11232:575;;;;;;:::o;1105:28::-;;;;:::o;4997:207::-;1337:10;1359:4;1337:27;1329:36;;;;;;5099:6;:13;5114:9;839:2;2273:29;;;;;:68;;;2331:10;2318:9;:23;;2273:68;:98;;;;-1:-1:-1;2357:14:16;;;2273:98;:129;;;;-1:-1:-1;2387:15:16;;;2273:129;2265:138;;;;;;;;5139:8;:20;;;5169:28;;;;;;;;;;;;;;;;;1375:1;;4997:207;:::o;2794:467:17:-;2880:10;1543:14:16;;;;:7;:14;;;;;;;;1535:23;;;;;;;;1647:12;:27;;;;;;;;;;:39;2918:13:17;;1647:39:16;;:44;;1639:53;;;;;;1924:28;;;;:13;:28;;;;;;;;2969:10:17;1924:35:16;;;;;;;;;2954:13:17;;2969:10;1924:35:16;;1923:36;1915:45;;;;;;3007:13:17;1238:26;1250:13;1238:11;:26::i;:::-;1237:27;1216:92;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3036:28;;;;3079:4;3036:28;;;;;;;;3065:10;3036:40;;;;;;;;:47;;;;;;;;;;3098:39;;3050:13;;3098:39;;;3151:26;3163:13;3151:11;:26::i;:::-;3147:108;;;3193:51;3213:13;3228:15;3193:19;:51::i;:::-;1970:1:16;1702;;1568;2794:467:17;;:::o;5463:244:16:-;5567:18;5617:40;5632:11;5645:5;5652:4;5617:14;:40::i;:::-;5601:56;;5667:33;5686:13;5667:18;:33::i;:::-;5463:244;;;;;:::o;1096:53:17:-;;;;;;;;;;;;;:::o;800:41:16:-;839:2;800:41;:::o;1079:20::-;;;;:::o;4377:449::-;4548:6;1337:10;1359:4;1337:27;1329:36;;;;;;1543:14;;;;;;;:7;:14;;;;;;4486:5;;1543:14;;1535:23;;;;;;;;1450:14;;;;;;;:7;:14;;;;;;4519:8;;1450:14;;1449:15;1441:24;;;;;;4555:1;4548:8;;4543:149;4560:6;:13;4558:15;;4543:149;;;4609:5;4596:18;;:6;4603:1;4596:9;;;;;;;;;;;;;;;;;;;;;;:18;4592:100;;;4646:8;4634:6;4641:1;4634:9;;;;;;;;;;;;;;;;;;:20;;;;;;;;;;;;;;;;;;4672:5;;4592:100;4575:3;;;;;4543:149;;;4701:14;;;;4718:5;4701:14;;;:7;:14;;;;;;:22;;;;;;;;;4733:17;;;;;;;;:24;;;;;4701:22;4733:24;;;;4767:19;;4701:14;;4767:19;;;4796:23;;;;;;;;;;;1568:1;1375;4377:449;;;:::o;3375:516:17:-;3564:23;2044:27:16;;;;;;;;;;:36;;;3461:13:17;;2044:36:16;;2043:37;2035:46;;;;;;3499:13:17;1410:26;1422:13;1410:11;:26::i;:::-;1389:95;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1638:17;;1603:32;;;;:17;:32;;;;;;3535:13;;1603:52;1584:15;:71;;1563:138;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3590:12;:27;;;;;;;;;;;;3627:12;;;:19;;;;3642:4;3627:19;;;;;;3674:15;;3691:9;;;;3702:8;;;;:15;;3660:68;;;3702:15;;;;;3627:19;3702:15;;;;;;;;;;;;3660:68;;;;;;;;;;;;;;;;;;3590:27;;-1:-1:-1;3660:68:17;;3674:15;;;;;3691:9;;3660:68;3702:8;:15;;3660:68;;3702:8;:15;3660:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:13;:68::i;:::-;3656:229;;;3749:24;;3759:13;;3749:24;;;;;3656:229;;;3809:31;;3826:13;;3809:31;;;;;3854:12;;;:20;;;;;;3656:229;1494:1;2091::16;3375:516:17;;;:::o;3959:234::-;4068:32;;;;:17;:32;;;;;;;;;:51;;;4134:52;;;;;;;4086:13;;4134:52;;;;;;;;;3959:234;;:::o;9373:451:16:-;9505:18;9475:11;2158:13;;;;;2150:22;;;;;;9555:16;;9611:140;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9611:140:16;;;;;;9581:27;;;;;;;;;;:170;;;;;;;;;;;;;;;-1:-1:-1;9581:170:16;;;;;;;9555:16;;-1:-1:-1;9611:140:16;;9581:27;;:170;;;;;;;;;;:::i;:::-;-1:-1:-1;9581:170:16;;;;;;;;;;;;;;;;;;;;;;;9761:16;:21;;-1:-1:-1;9761:21:16;;;9792:25;;9803:13;;9792:25;;-1:-1:-1;;9792:25:16;9373:451;;;;;;:::o;7449:1103::-;7552:4;7568:11;7627:4;7621:11;7760:2;7754:4;7750:13;8425:1;8406;8298:10;8279:1;8256:5;8227:11;7882:5;7877:3;7873:15;7851:662;7841:672;7449:1103;-1:-1:-1;;;;;;;;7449:1103:16:o;851:3344:17:-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;851:3344:17;;;-1:-1:-1;851:3344:17;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;"
            }
        }
    },
    "sources": {
        "examples/ExchangeWrapper/ExchangeWrapper.sol": {
            "id": 0
        },
        "examples/Validator/Validator.sol": {
            "id": 1
        },
        "examples/Wallet/Wallet.sol": {
            "id": 2
        },
        "examples/Whitelist/Whitelist.sol": {
            "id": 3
        },
        "extensions/Forwarder/Forwarder.sol": {
            "id": 4
        },
        "extensions/Forwarder/MixinAssets.sol": {
            "id": 5
        },
        "extensions/Forwarder/MixinExchangeWrapper.sol": {
            "id": 6
        },
        "extensions/Forwarder/MixinForwarderCore.sol": {
            "id": 7
        },
        "extensions/Forwarder/MixinWeth.sol": {
            "id": 8
        },
        "extensions/Forwarder/interfaces/IAssets.sol": {
            "id": 9
        },
        "extensions/Forwarder/interfaces/IForwarderCore.sol": {
            "id": 10
        },
        "extensions/Forwarder/libs/LibConstants.sol": {
            "id": 11
        },
        "extensions/Forwarder/mixins/MAssets.sol": {
            "id": 12
        },
        "extensions/Forwarder/mixins/MExchangeWrapper.sol": {
            "id": 13
        },
        "extensions/Forwarder/mixins/MWeth.sol": {
            "id": 14
        },
        "extensions/OrderValidator/OrderValidator.sol": {
            "id": 15
        },
        "multisig/MultiSigWallet.sol": {
            "id": 16
        },
        "multisig/MultiSigWalletWithTimeLock.sol": {
            "id": 17
        },
        "protocol/AssetProxy/ERC20Proxy.sol": {
            "id": 18
        },
        "protocol/AssetProxy/ERC721Proxy.sol": {
            "id": 19
        },
        "protocol/AssetProxy/MixinAuthorizable.sol": {
            "id": 20
        },
        "protocol/AssetProxy/interfaces/IAssetData.sol": {
            "id": 21
        },
        "protocol/AssetProxy/interfaces/IAssetProxy.sol": {
            "id": 22
        },
        "protocol/AssetProxy/interfaces/IAuthorizable.sol": {
            "id": 23
        },
        "protocol/AssetProxy/mixins/MAuthorizable.sol": {
            "id": 24
        },
        "protocol/AssetProxyOwner/AssetProxyOwner.sol": {
            "id": 25
        },
        "protocol/Exchange/Exchange.sol": {
            "id": 26
        },
        "protocol/Exchange/MixinAssetProxyDispatcher.sol": {
            "id": 27
        },
        "protocol/Exchange/MixinExchangeCore.sol": {
            "id": 28
        },
        "protocol/Exchange/MixinMatchOrders.sol": {
            "id": 29
        },
        "protocol/Exchange/MixinSignatureValidator.sol": {
            "id": 30
        },
        "protocol/Exchange/MixinTransactions.sol": {
            "id": 31
        },
        "protocol/Exchange/MixinWrapperFunctions.sol": {
            "id": 32
        },
        "protocol/Exchange/interfaces/IAssetProxyDispatcher.sol": {
            "id": 33
        },
        "protocol/Exchange/interfaces/IExchange.sol": {
            "id": 34
        },
        "protocol/Exchange/interfaces/IExchangeCore.sol": {
            "id": 35
        },
        "protocol/Exchange/interfaces/IMatchOrders.sol": {
            "id": 36
        },
        "protocol/Exchange/interfaces/ISignatureValidator.sol": {
            "id": 37
        },
        "protocol/Exchange/interfaces/ITransactions.sol": {
            "id": 38
        },
        "protocol/Exchange/interfaces/IValidator.sol": {
            "id": 39
        },
        "protocol/Exchange/interfaces/IWallet.sol": {
            "id": 40
        },
        "protocol/Exchange/interfaces/IWrapperFunctions.sol": {
            "id": 41
        },
        "protocol/Exchange/libs/LibAbiEncoder.sol": {
            "id": 42
        },
        "protocol/Exchange/libs/LibConstants.sol": {
            "id": 43
        },
        "protocol/Exchange/libs/LibEIP712.sol": {
            "id": 44
        },
        "protocol/Exchange/libs/LibExchangeErrors.sol": {
            "id": 45
        },
        "protocol/Exchange/libs/LibFillResults.sol": {
            "id": 46
        },
        "protocol/Exchange/libs/LibMath.sol": {
            "id": 47
        },
        "protocol/Exchange/libs/LibOrder.sol": {
            "id": 48
        },
        "protocol/Exchange/mixins/MAssetProxyDispatcher.sol": {
            "id": 49
        },
        "protocol/Exchange/mixins/MExchangeCore.sol": {
            "id": 50
        },
        "protocol/Exchange/mixins/MMatchOrders.sol": {
            "id": 51
        },
        "protocol/Exchange/mixins/MSignatureValidator.sol": {
            "id": 52
        },
        "protocol/Exchange/mixins/MTransactions.sol": {
            "id": 53
        },
        "protocol/Exchange/mixins/MWrapperFunctions.sol": {
            "id": 54
        },
        "test/DummyERC20Token/DummyERC20Token.sol": {
            "id": 55
        },
        "test/DummyERC20Token/DummyMultipleReturnERC20Token.sol": {
            "id": 56
        },
        "test/DummyERC20Token/DummyNoReturnERC20Token.sol": {
            "id": 57
        },
        "test/DummyERC721Receiver/DummyERC721Receiver.sol": {
            "id": 58
        },
        "test/DummyERC721Receiver/InvalidERC721Receiver.sol": {
            "id": 59
        },
        "test/DummyERC721Token/DummyERC721Token.sol": {
            "id": 60
        },
        "test/ReentrantERC20Token/ReentrantERC20Token.sol": {
            "id": 61
        },
        "test/TestAssetProxyDispatcher/TestAssetProxyDispatcher.sol": {
            "id": 62
        },
        "test/TestAssetProxyOwner/TestAssetProxyOwner.sol": {
            "id": 63
        },
        "test/TestConstants/TestConstants.sol": {
            "id": 64
        },
        "test/TestExchangeInternals/TestExchangeInternals.sol": {
            "id": 65
        },
        "test/TestLibBytes/TestLibBytes.sol": {
            "id": 66
        },
        "test/TestLibs/TestLibs.sol": {
            "id": 67
        },
        "test/TestSignatureValidator/TestSignatureValidator.sol": {
            "id": 68
        },
        "test/TestStaticCallReceiver/TestStaticCallReceiver.sol": {
            "id": 69
        },
        "tokens/ERC20Token/ERC20Token.sol": {
            "id": 70
        },
        "tokens/ERC20Token/IERC20Token.sol": {
            "id": 71
        },
        "tokens/ERC20Token/MintableERC20Token.sol": {
            "id": 72
        },
        "tokens/ERC20Token/UnlimitedAllowanceERC20Token.sol": {
            "id": 73
        },
        "tokens/ERC721Token/ERC721Token.sol": {
            "id": 74
        },
        "tokens/ERC721Token/IERC721Receiver.sol": {
            "id": 75
        },
        "tokens/ERC721Token/IERC721Token.sol": {
            "id": 76
        },
        "tokens/ERC721Token/MintableERC721Token.sol": {
            "id": 77
        },
        "tokens/EtherToken/IEtherToken.sol": {
            "id": 78
        },
        "tokens/EtherToken/WETH9.sol": {
            "id": 79
        },
        "utils/LibBytes/LibBytes.sol": {
            "id": 80
        },
        "utils/Ownable/IOwnable.sol": {
            "id": 81
        },
        "utils/Ownable/Ownable.sol": {
            "id": 82
        },
        "utils/ReentrancyGuard/ReentrancyGuard.sol": {
            "id": 83
        },
        "utils/SafeMath/SafeMath.sol": {
            "id": 84
        }
    },
    "sourceCodes": {
        "examples/ExchangeWrapper/ExchangeWrapper.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\npragma experimental ABIEncoderV2;\n\nimport \"../../protocol/Exchange/interfaces/IExchange.sol\";\nimport \"../../protocol/Exchange/libs/LibOrder.sol\";\n\n\ncontract ExchangeWrapper {\n\n    // Exchange contract.\n    // solhint-disable-next-line var-name-mixedcase\n    IExchange internal EXCHANGE;\n\n    constructor (address _exchange)\n        public\n    {\n        EXCHANGE = IExchange(_exchange);\n    }\n\n    /// @dev Cancels all orders created by sender with a salt less than or equal to the targetOrderEpoch\n    ///      and senderAddress equal to this contract.\n    /// @param targetOrderEpoch Orders created with a salt less or equal to this value will be cancelled.\n    /// @param salt Arbitrary value to gaurantee uniqueness of 0x transaction hash.\n    /// @param makerSignature Proof that maker wishes to call this function with given params.\n    function cancelOrdersUpTo(\n        uint256 targetOrderEpoch,\n        uint256 salt,\n        bytes makerSignature\n    )\n        external\n    {\n        address makerAddress = msg.sender;\n\n        // Encode arguments into byte array.\n        bytes memory data = abi.encodeWithSelector(\n            EXCHANGE.cancelOrdersUpTo.selector,\n            targetOrderEpoch\n        );\n\n        // Call `cancelOrdersUpTo` via `executeTransaction`.\n        EXCHANGE.executeTransaction(\n            salt,\n            makerAddress,\n            data,\n            makerSignature\n        );\n    }\n\n    /// @dev Fills an order using `msg.sender` as the taker.\n    /// @param order Order struct containing order specifications.\n    /// @param takerAssetFillAmount Desired amount of takerAsset to sell.\n    /// @param salt Arbitrary value to gaurantee uniqueness of 0x transaction hash.\n    /// @param orderSignature Proof that order has been created by maker.\n    /// @param takerSignature Proof that taker wishes to call this function with given params.\n    function fillOrder(\n        LibOrder.Order memory order,\n        uint256 takerAssetFillAmount,\n        uint256 salt,\n        bytes memory orderSignature,\n        bytes memory takerSignature\n    )\n        public\n    {\n        address takerAddress = msg.sender;\n\n        // Encode arguments into byte array.\n        bytes memory data = abi.encodeWithSelector(\n            EXCHANGE.fillOrder.selector,\n            order,\n            takerAssetFillAmount,\n            orderSignature\n        );\n\n        // Call `fillOrder` via `executeTransaction`.\n        EXCHANGE.executeTransaction(\n            salt,\n            takerAddress,\n            data,\n            takerSignature\n        );\n    }\n}\n",
        "examples/Validator/Validator.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"../../protocol/Exchange/interfaces/IValidator.sol\";\n\n\ncontract Validator is \n    IValidator\n{\n\n    // The single valid signer for this wallet.\n    // solhint-disable-next-line var-name-mixedcase\n    address internal VALID_SIGNER;\n\n    /// @dev constructs a new `Validator` with a single valid signer.\n    /// @param validSigner The sole, valid signer.\n    constructor (address validSigner) public {\n        VALID_SIGNER = validSigner;\n    }\n\n    /// @dev Verifies that a signature is valid. `signer` must match `VALID_SIGNER`.\n    /// @param hash Message hash that is signed.\n    /// @param signerAddress Address that should have signed the given hash.\n    /// @param signature Proof of signing.\n    /// @return Validity of signature.\n    // solhint-disable no-unused-vars\n    function isValidSignature(\n        bytes32 hash,\n        address signerAddress,\n        bytes signature\n    )\n        external\n        view\n        returns (bool isValid)\n    {\n        return (signerAddress == VALID_SIGNER);\n    }\n    // solhint-enable no-unused-vars\n}\n",
        "examples/Wallet/Wallet.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"../../protocol/Exchange/interfaces/IWallet.sol\";\nimport \"../../utils/LibBytes/LibBytes.sol\";\n\n\ncontract Wallet is \n    IWallet\n{\n    using LibBytes for bytes;\n\n    // The owner of this wallet.\n    // solhint-disable-next-line var-name-mixedcase\n    address internal WALLET_OWNER;\n\n    /// @dev constructs a new `Wallet` with a single owner.\n    /// @param walletOwner The owner of this wallet.\n    constructor (address walletOwner) public {\n        WALLET_OWNER = walletOwner;\n    }\n\n    /// @dev Validates an EIP712 signature.\n    ///      The signer must match the owner of this wallet.\n    /// @param hash Message hash that is signed.\n    /// @param eip712Signature Proof of signing.\n    /// @return Validity of signature.\n    function isValidSignature(\n        bytes32 hash,\n        bytes eip712Signature\n    )\n        external\n        view\n        returns (bool isValid)\n    {\n        require(\n            eip712Signature.length == 65,\n            \"LENGTH_65_REQUIRED\"\n        );\n\n        uint8 v = uint8(eip712Signature[0]);\n        bytes32 r = eip712Signature.readBytes32(1);\n        bytes32 s = eip712Signature.readBytes32(33);\n        address recoveredAddress = ecrecover(hash, v, r, s);\n        isValid = WALLET_OWNER == recoveredAddress;\n        return isValid;\n    }\n}\n",
        "examples/Whitelist/Whitelist.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\npragma experimental ABIEncoderV2;\n\nimport \"../../protocol/Exchange/interfaces/IExchange.sol\";\nimport \"../../protocol/Exchange/libs/LibOrder.sol\";\nimport \"../../utils/Ownable/Ownable.sol\";\n\n\ncontract Whitelist is\n    Ownable\n{\n\n    // Mapping of address => whitelist status.\n    mapping (address => bool) public isWhitelisted;\n\n    // Exchange contract.\n    // solhint-disable var-name-mixedcase\n    IExchange internal EXCHANGE;\n    bytes internal TX_ORIGIN_SIGNATURE;\n    // solhint-enable var-name-mixedcase\n\n    byte constant internal VALIDATOR_SIGNATURE_BYTE = \"\\x05\";\n\n    constructor (address _exchange)\n        public\n    {\n        EXCHANGE = IExchange(_exchange);\n        TX_ORIGIN_SIGNATURE = abi.encodePacked(address(this), VALIDATOR_SIGNATURE_BYTE);\n    }\n\n    /// @dev Adds or removes an address from the whitelist.\n    /// @param target Address to add or remove from whitelist.\n    /// @param isApproved Whitelist status to assign to address.\n    function updateWhitelistStatus(\n        address target,\n        bool isApproved\n    )\n        external\n        onlyOwner\n    {\n        isWhitelisted[target] = isApproved;\n    }\n\n    /// @dev Verifies signer is same as signer of current Ethereum transaction.\n    ///      NOTE: This function can currently be used to validate signatures coming from outside of this contract.\n    ///      Extra safety checks can be added for a production contract.\n    /// @param signerAddress Address that should have signed the given hash.\n    /// @param signature Proof of signing.\n    /// @return Validity of order signature.\n    // solhint-disable no-unused-vars\n    function isValidSignature(\n        bytes32 hash,\n        address signerAddress,\n        bytes signature\n    )\n        external\n        view\n        returns (bool isValid)\n    {\n        // solhint-disable-next-line avoid-tx-origin\n        return signerAddress == tx.origin;\n    }\n    // solhint-enable no-unused-vars\n\n    /// @dev Fills an order using `msg.sender` as the taker.\n    ///      The transaction will revert if both the maker and taker are not whitelisted.\n    ///      Orders should specify this contract as the `senderAddress` in order to gaurantee\n    ///      that both maker and taker have been whitelisted.\n    /// @param order Order struct containing order specifications.\n    /// @param takerAssetFillAmount Desired amount of takerAsset to sell.\n    /// @param salt Arbitrary value to gaurantee uniqueness of 0x transaction hash.\n    /// @param orderSignature Proof that order has been created by maker.\n    function fillOrderIfWhitelisted(\n        LibOrder.Order memory order,\n        uint256 takerAssetFillAmount,\n        uint256 salt,\n        bytes memory orderSignature\n    )\n        public\n    {\n        address takerAddress = msg.sender;\n\n        // This contract must be the entry point for the transaction.\n        require(\n            // solhint-disable-next-line avoid-tx-origin\n            takerAddress == tx.origin,\n            \"INVALID_SENDER\"\n        );\n\n        // Check if maker is on the whitelist.\n        require(\n            isWhitelisted[order.makerAddress],\n            \"MAKER_NOT_WHITELISTED\"\n        );\n\n        // Check if taker is on the whitelist.\n        require(\n            isWhitelisted[takerAddress],\n            \"TAKER_NOT_WHITELISTED\"\n        );\n\n        // Encode arguments into byte array.\n        bytes memory data = abi.encodeWithSelector(\n            EXCHANGE.fillOrder.selector,\n            order,\n            takerAssetFillAmount,\n            orderSignature\n        );\n\n        // Call `fillOrder` via `executeTransaction`.\n        EXCHANGE.executeTransaction(\n            salt,\n            takerAddress,\n            data,\n            TX_ORIGIN_SIGNATURE\n        );\n    }\n}\n",
        "extensions/Forwarder/Forwarder.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\npragma experimental ABIEncoderV2;\n\nimport \"./MixinWeth.sol\";\nimport \"./MixinForwarderCore.sol\";\nimport \"./libs/LibConstants.sol\";\nimport \"./MixinAssets.sol\";\nimport \"./MixinExchangeWrapper.sol\";\n\n\n// solhint-disable no-empty-blocks\ncontract Forwarder is\n    LibConstants,\n    MixinWeth,\n    MixinAssets,\n    MixinExchangeWrapper,\n    MixinForwarderCore\n{\n    constructor (\n        address _exchange,\n        bytes memory _zrxAssetData,\n        bytes memory _wethAssetData\n    )\n        public\n        LibConstants(\n            _exchange,\n            _zrxAssetData,\n            _wethAssetData\n        )\n        MixinForwarderCore()\n    {}\n}\n",
        "extensions/Forwarder/MixinAssets.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"../../utils/LibBytes/LibBytes.sol\";\nimport \"../../utils/Ownable/Ownable.sol\";\nimport \"../../tokens/ERC20Token/IERC20Token.sol\";\nimport \"../../tokens/ERC721Token/IERC721Token.sol\";\nimport \"./libs/LibConstants.sol\";\nimport \"./mixins/MAssets.sol\";\n\n\ncontract MixinAssets is\n    Ownable,\n    LibConstants,\n    MAssets\n{\n    using LibBytes for bytes;\n\n    bytes4 constant internal ERC20_TRANSFER_SELECTOR = bytes4(keccak256(\"transfer(address,uint256)\"));\n\n    /// @dev Withdraws assets from this contract. The contract requires a ZRX balance in order to \n    ///      function optimally, and this function allows the ZRX to be withdrawn by owner. It may also be\n    ///      used to withdraw assets that were accidentally sent to this contract.\n    /// @param assetData Byte array encoded for the respective asset proxy.\n    /// @param amount Amount of ERC20 token to withdraw.\n    function withdrawAsset(\n        bytes assetData,\n        uint256 amount\n    )\n        external\n        onlyOwner\n    {\n        transferAssetToSender(assetData, amount);\n    }\n\n    /// @dev Transfers given amount of asset to sender.\n    /// @param assetData Byte array encoded for the respective asset proxy.\n    /// @param amount Amount of asset to transfer to sender.\n    function transferAssetToSender(\n        bytes memory assetData,\n        uint256 amount\n    )\n        internal\n    {\n        bytes4 proxyId = assetData.readBytes4(0);\n\n        if (proxyId == ERC20_DATA_ID) {\n            transferERC20Token(assetData, amount);\n        } else if (proxyId == ERC721_DATA_ID) {\n            transferERC721Token(assetData, amount);\n        } else {\n            revert(\"UNSUPPORTED_ASSET_PROXY\");\n        }\n    }\n\n    /// @dev Decodes ERC20 assetData and transfers given amount to sender.\n    /// @param assetData Byte array encoded for the respective asset proxy.\n    /// @param amount Amount of asset to transfer to sender.\n    function transferERC20Token(\n        bytes memory assetData,\n        uint256 amount\n    )\n        internal\n    {\n        address token = assetData.readAddress(16);\n\n        // Transfer tokens.\n        // We do a raw call so we can check the success separate\n        // from the return data.\n        bool success = token.call(abi.encodeWithSelector(\n            ERC20_TRANSFER_SELECTOR,\n            msg.sender,\n            amount\n        ));\n        require(\n            success,\n            \"TRANSFER_FAILED\"\n        );\n        \n        // Check return data.\n        // If there is no return data, we assume the token incorrectly\n        // does not return a bool. In this case we expect it to revert\n        // on failure, which was handled above.\n        // If the token does return data, we require that it is a single\n        // value that evaluates to true.\n        assembly {\n            if returndatasize {\n                success := 0\n                if eq(returndatasize, 32) {\n                    // First 64 bytes of memory are reserved scratch space\n                    returndatacopy(0, 0, 32)\n                    success := mload(0)\n                }\n            }\n        }\n        require(\n            success,\n            \"TRANSFER_FAILED\"\n        );\n    }\n\n    /// @dev Decodes ERC721 assetData and transfers given amount to sender.\n    /// @param assetData Byte array encoded for the respective asset proxy.\n    /// @param amount Amount of asset to transfer to sender.\n    function transferERC721Token(\n        bytes memory assetData,\n        uint256 amount\n    )\n        internal\n    {\n        require(\n            amount == 1,\n            \"INVALID_AMOUNT\"\n        );\n        // Decode asset data.\n        address token = assetData.readAddress(16);\n        uint256 tokenId = assetData.readUint256(36);\n\n        // Perform transfer.\n        IERC721Token(token).transferFrom(\n            address(this),\n            msg.sender,\n            tokenId\n        );\n    }\n}\n",
        "extensions/Forwarder/MixinExchangeWrapper.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\npragma experimental ABIEncoderV2;\n\nimport \"./libs/LibConstants.sol\";\nimport \"./mixins/MExchangeWrapper.sol\";\nimport \"../../protocol/Exchange/libs/LibAbiEncoder.sol\";\nimport \"../../protocol/Exchange/libs/LibOrder.sol\";\nimport \"../../protocol/Exchange/libs/LibFillResults.sol\";\nimport \"../../protocol/Exchange/libs/LibMath.sol\";\n\n\ncontract MixinExchangeWrapper is\n    LibAbiEncoder,\n    LibFillResults,\n    LibMath,\n    LibConstants,\n    MExchangeWrapper\n{\n    /// @dev Fills the input order.\n    ///      Returns false if the transaction would otherwise revert.\n    /// @param order Order struct containing order specifications.\n    /// @param takerAssetFillAmount Desired amount of takerAsset to sell.\n    /// @param signature Proof that order has been created by maker.\n    /// @return Amounts filled and fees paid by maker and taker.\n    function fillOrderNoThrow(\n        LibOrder.Order memory order,\n        uint256 takerAssetFillAmount,\n        bytes memory signature\n    )\n        internal\n        returns (FillResults memory fillResults)\n    {\n        // ABI encode calldata for `fillOrder`\n        bytes memory fillOrderCalldata = abiEncodeFillOrder(\n            order,\n            takerAssetFillAmount,\n            signature\n        );\n\n        address exchange = address(EXCHANGE);\n\n        // Call `fillOrder` and handle any exceptions gracefully\n        assembly {\n            let success := call(\n                gas,                                // forward all gas\n                exchange,                           // call address of Exchange contract\n                0,                                  // transfer 0 wei\n                add(fillOrderCalldata, 32),         // pointer to start of input (skip array length in first 32 bytes)\n                mload(fillOrderCalldata),           // length of input\n                fillOrderCalldata,                  // write output over input\n                128                                 // output size is 128 bytes\n            )\n            if success {\n                mstore(fillResults, mload(fillOrderCalldata))\n                mstore(add(fillResults, 32), mload(add(fillOrderCalldata, 32)))\n                mstore(add(fillResults, 64), mload(add(fillOrderCalldata, 64)))\n                mstore(add(fillResults, 96), mload(add(fillOrderCalldata, 96)))\n            }\n        }\n        // fillResults values will be 0 by default if call was unsuccessful\n        return fillResults;\n    }\n\n    /// @dev Synchronously executes multiple calls of fillOrder until total amount of WETH has been sold by taker.\n    ///      Returns false if the transaction would otherwise revert.\n    /// @param orders Array of order specifications.\n    /// @param wethSellAmount Desired amount of WETH to sell.\n    /// @param signatures Proofs that orders have been signed by makers.\n    /// @return Amounts filled and fees paid by makers and taker.\n    function marketSellWeth(\n        LibOrder.Order[] memory orders,\n        uint256 wethSellAmount,\n        bytes[] memory signatures\n    )\n        internal\n        returns (FillResults memory totalFillResults)\n    {\n        bytes memory makerAssetData = orders[0].makerAssetData;\n        bytes memory wethAssetData = WETH_ASSET_DATA;\n\n        uint256 ordersLength = orders.length;\n        for (uint256 i = 0; i != ordersLength; i++) {\n\n            // We assume that asset being bought by taker is the same for each order.\n            // We assume that asset being sold by taker is WETH for each order.\n            orders[i].makerAssetData = makerAssetData;\n            orders[i].takerAssetData = wethAssetData;\n\n            // Calculate the remaining amount of WETH to sell\n            uint256 remainingTakerAssetFillAmount = safeSub(wethSellAmount, totalFillResults.takerAssetFilledAmount);\n\n            // Attempt to sell the remaining amount of WETH\n            FillResults memory singleFillResults = fillOrderNoThrow(\n                orders[i],\n                remainingTakerAssetFillAmount,\n                signatures[i]\n            );\n\n            // Update amounts filled and fees paid by maker and taker\n            addFillResults(totalFillResults, singleFillResults);\n\n            // Stop execution if the entire amount of takerAsset has been sold\n            if (totalFillResults.takerAssetFilledAmount >= wethSellAmount) {\n                break;\n            }\n        }\n        return totalFillResults;\n    }\n\n    /// @dev Synchronously executes multiple fill orders in a single transaction until total amount is bought by taker.\n    ///      Returns false if the transaction would otherwise revert.\n    ///      The asset being sold by taker must always be WETH.\n    /// @param orders Array of order specifications.\n    /// @param makerAssetFillAmount Desired amount of makerAsset to buy.\n    /// @param signatures Proofs that orders have been signed by makers.\n    /// @return Amounts filled and fees paid by makers and taker.\n    function marketBuyExactAmountWithWeth(\n        LibOrder.Order[] memory orders,\n        uint256 makerAssetFillAmount,\n        bytes[] memory signatures\n    )\n        internal\n        returns (FillResults memory totalFillResults)\n    {\n        bytes memory makerAssetData = orders[0].makerAssetData;\n        bytes memory wethAssetData = WETH_ASSET_DATA;\n\n        uint256 ordersLength = orders.length;\n        for (uint256 i = 0; i != ordersLength; i++) {\n\n            // We assume that asset being bought by taker is the same for each order.\n            // We assume that asset being sold by taker is WETH for each order.\n            orders[i].makerAssetData = makerAssetData;\n            orders[i].takerAssetData = wethAssetData;\n\n            // Calculate the remaining amount of makerAsset to buy\n            uint256 remainingMakerAssetFillAmount = safeSub(makerAssetFillAmount, totalFillResults.makerAssetFilledAmount);\n\n            // Convert the remaining amount of makerAsset to buy into remaining amount\n            // of takerAsset to sell, assuming entire amount can be sold in the current order\n            uint256 remainingTakerAssetFillAmount = getPartialAmountFloor(\n                orders[i].takerAssetAmount,\n                orders[i].makerAssetAmount,\n                remainingMakerAssetFillAmount\n            );\n\n            // Attempt to sell the remaining amount of takerAsset\n            FillResults memory singleFillResults = fillOrderNoThrow(\n                orders[i],\n                remainingTakerAssetFillAmount,\n                signatures[i]\n            );\n\n            // Update amounts filled and fees paid by maker and taker\n            addFillResults(totalFillResults, singleFillResults);\n\n            // Stop execution if the entire amount of makerAsset has been bought\n            uint256 makerAssetFilledAmount = totalFillResults.makerAssetFilledAmount;\n            if (makerAssetFilledAmount >= makerAssetFillAmount) {\n                break;\n            }\n        }\n\n        require(\n            makerAssetFilledAmount >= makerAssetFillAmount,\n            \"COMPLETE_FILL_FAILED\"\n        );\n        return totalFillResults;\n    }\n\n    /// @dev Buys zrxBuyAmount of ZRX fee tokens, taking into account ZRX fees for each order. This will guarantee\n    ///      that at least zrxBuyAmount of ZRX is purchased (sometimes slightly over due to rounding issues).\n    ///      It is possible that a request to buy 200 ZRX will require purchasing 202 ZRX\n    ///      as 2 ZRX is required to purchase the 200 ZRX fee tokens. This guarantees at least 200 ZRX for future purchases.\n    ///      The asset being sold by taker must always be WETH. \n    /// @param orders Array of order specifications containing ZRX as makerAsset and WETH as takerAsset.\n    /// @param zrxBuyAmount Desired amount of ZRX to buy.\n    /// @param signatures Proofs that orders have been created by makers.\n    /// @return totalFillResults Amounts filled and fees paid by maker and taker.\n    function marketBuyExactZrxWithWeth(\n        LibOrder.Order[] memory orders,\n        uint256 zrxBuyAmount,\n        bytes[] memory signatures\n    )\n        internal\n        returns (FillResults memory totalFillResults)\n    {\n        // Do nothing if zrxBuyAmount == 0\n        if (zrxBuyAmount == 0) {\n            return totalFillResults;\n        }\n\n        bytes memory zrxAssetData = ZRX_ASSET_DATA;\n        bytes memory wethAssetData = WETH_ASSET_DATA;\n        uint256 zrxPurchased = 0;\n\n        uint256 ordersLength = orders.length;\n        for (uint256 i = 0; i != ordersLength; i++) {\n\n            // All of these are ZRX/WETH, so we can drop the respective assetData from calldata.\n            orders[i].makerAssetData = zrxAssetData;\n            orders[i].takerAssetData = wethAssetData;\n\n            // Calculate the remaining amount of ZRX to buy.\n            uint256 remainingZrxBuyAmount = safeSub(zrxBuyAmount, zrxPurchased);\n\n            // Convert the remaining amount of ZRX to buy into remaining amount\n            // of WETH to sell, assuming entire amount can be sold in the current order.\n            uint256 remainingWethSellAmount = getPartialAmountFloor(\n                orders[i].takerAssetAmount,\n                safeSub(orders[i].makerAssetAmount, orders[i].takerFee),  // our exchange rate after fees \n                remainingZrxBuyAmount\n            );\n\n            // Attempt to sell the remaining amount of WETH.\n            FillResults memory singleFillResult = fillOrderNoThrow(\n                orders[i],\n                safeAdd(remainingWethSellAmount, 1),  // we add 1 wei to the fill amount to make up for rounding errors\n                signatures[i]\n            );\n\n            // Update amounts filled and fees paid by maker and taker.\n            addFillResults(totalFillResults, singleFillResult);\n            zrxPurchased = safeSub(totalFillResults.makerAssetFilledAmount, totalFillResults.takerFeePaid);\n\n            // Stop execution if the entire amount of ZRX has been bought.\n            if (zrxPurchased >= zrxBuyAmount) {\n                break;\n            }\n        }\n\n        require(\n            zrxPurchased >= zrxBuyAmount,\n            \"COMPLETE_FILL_FAILED\"\n        );\n        return totalFillResults;\n    }\n}\n",
        "extensions/Forwarder/MixinForwarderCore.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\npragma experimental ABIEncoderV2;\n\nimport \"./libs/LibConstants.sol\";\nimport \"./mixins/MWeth.sol\";\nimport \"./mixins/MAssets.sol\";\nimport \"./mixins/MExchangeWrapper.sol\";\nimport \"./interfaces/IForwarderCore.sol\";\nimport \"../../utils/LibBytes/LibBytes.sol\";\nimport \"../../protocol/Exchange/libs/LibOrder.sol\";\nimport \"../../protocol/Exchange/libs/LibFillResults.sol\";\nimport \"../../protocol/Exchange/libs/LibMath.sol\";\n\n\ncontract MixinForwarderCore is\n    LibFillResults,\n    LibMath,\n    LibConstants,\n    MWeth,\n    MAssets,\n    MExchangeWrapper,\n    IForwarderCore\n{\n    using LibBytes for bytes;\n\n    /// @dev Constructor approves ERC20 proxy to transfer ZRX and WETH on this contract's behalf.\n    constructor ()\n        public\n    {\n        address proxyAddress = EXCHANGE.getAssetProxy(ERC20_DATA_ID);\n        require(\n            proxyAddress != address(0),\n            \"UNREGISTERED_ASSET_PROXY\"\n        );\n        ETHER_TOKEN.approve(proxyAddress, MAX_UINT);\n        ZRX_TOKEN.approve(proxyAddress, MAX_UINT);\n    }\n\n    /// @dev Purchases as much of orders' makerAssets as possible by selling up to 95% of transaction's ETH value.\n    ///      Any ZRX required to pay fees for primary orders will automatically be purchased by this contract.\n    ///      5% of ETH value is reserved for paying fees to order feeRecipients (in ZRX) and forwarding contract feeRecipient (in ETH).\n    ///      Any ETH not spent will be refunded to sender.\n    /// @param orders Array of order specifications used containing desired makerAsset and WETH as takerAsset. \n    /// @param signatures Proofs that orders have been created by makers.\n    /// @param feeOrders Array of order specifications containing ZRX as makerAsset and WETH as takerAsset. Used to purchase ZRX for primary order fees.\n    /// @param feeSignatures Proofs that feeOrders have been created by makers.\n    /// @param feePercentage Percentage of WETH sold that will payed as fee to forwarding contract feeRecipient.\n    /// @param feeRecipient Address that will receive ETH when orders are filled.\n    /// @return Amounts filled and fees paid by maker and taker for both sets of orders.\n    function marketSellOrdersWithEth(\n        LibOrder.Order[] memory orders,\n        bytes[] memory signatures,\n        LibOrder.Order[] memory feeOrders,\n        bytes[] memory feeSignatures,\n        uint256  feePercentage,\n        address feeRecipient\n    )\n        public\n        payable\n        returns (\n            FillResults memory orderFillResults,\n            FillResults memory feeOrderFillResults\n        )\n    {\n        // Convert ETH to WETH.\n        convertEthToWeth();\n\n        uint256 wethSellAmount;\n        uint256 zrxBuyAmount;\n        uint256 makerAssetAmountPurchased;\n        if (orders[0].makerAssetData.equals(ZRX_ASSET_DATA)) {\n            // Calculate amount of WETH that won't be spent on ETH fees.\n            wethSellAmount = getPartialAmountFloor(\n                PERCENTAGE_DENOMINATOR,\n                safeAdd(PERCENTAGE_DENOMINATOR, feePercentage),\n                msg.value\n            );\n            // Market sell available WETH.\n            // ZRX fees are paid with this contract's balance.\n            orderFillResults = marketSellWeth(\n                orders,\n                wethSellAmount,\n                signatures\n            );\n            // The fee amount must be deducted from the amount transfered back to sender.\n            makerAssetAmountPurchased = safeSub(orderFillResults.makerAssetFilledAmount, orderFillResults.takerFeePaid);\n        } else {\n            // 5% of WETH is reserved for filling feeOrders and paying feeRecipient.\n            wethSellAmount = getPartialAmountFloor(\n                MAX_WETH_FILL_PERCENTAGE,\n                PERCENTAGE_DENOMINATOR,\n                msg.value\n            );\n            // Market sell 95% of WETH.\n            // ZRX fees are payed with this contract's balance.\n            orderFillResults = marketSellWeth(\n                orders,\n                wethSellAmount,\n                signatures\n            );\n            // Buy back all ZRX spent on fees.\n            zrxBuyAmount = orderFillResults.takerFeePaid;\n            feeOrderFillResults = marketBuyExactZrxWithWeth(\n                feeOrders,\n                zrxBuyAmount,\n                feeSignatures\n            );\n            makerAssetAmountPurchased = orderFillResults.makerAssetFilledAmount;\n        }\n\n        // Transfer feePercentage of total ETH spent on primary orders to feeRecipient.\n        // Refund remaining ETH to msg.sender.\n        transferEthFeeAndRefund(\n            orderFillResults.takerAssetFilledAmount,\n            feeOrderFillResults.takerAssetFilledAmount,\n            feePercentage,\n            feeRecipient\n        );\n\n        // Transfer purchased assets to msg.sender.\n        transferAssetToSender(orders[0].makerAssetData, makerAssetAmountPurchased);\n    }\n\n    /// @dev Attempt to purchase makerAssetFillAmount of makerAsset by selling ETH provided with transaction.\n    ///      Any ZRX required to pay fees for primary orders will automatically be purchased by this contract.\n    ///      Any ETH not spent will be refunded to sender.\n    /// @param orders Array of order specifications used containing desired makerAsset and WETH as takerAsset. \n    /// @param makerAssetFillAmount Desired amount of makerAsset to purchase.\n    /// @param signatures Proofs that orders have been created by makers.\n    /// @param feeOrders Array of order specifications containing ZRX as makerAsset and WETH as takerAsset. Used to purchase ZRX for primary order fees.\n    /// @param feeSignatures Proofs that feeOrders have been created by makers.\n    /// @param feePercentage Percentage of WETH sold that will payed as fee to forwarding contract feeRecipient.\n    /// @param feeRecipient Address that will receive ETH when orders are filled.\n    /// @return Amounts filled and fees paid by maker and taker for both sets of orders.\n    function marketBuyOrdersWithEth(\n        LibOrder.Order[] memory orders,\n        uint256 makerAssetFillAmount,\n        bytes[] memory signatures,\n        LibOrder.Order[] memory feeOrders,\n        bytes[] memory feeSignatures,\n        uint256  feePercentage,\n        address feeRecipient\n    )\n        public\n        payable\n        returns (\n            FillResults memory orderFillResults,\n            FillResults memory feeOrderFillResults\n        )\n    {\n        // Convert ETH to WETH.\n        convertEthToWeth();\n\n        uint256 zrxBuyAmount;\n        uint256 makerAssetAmountPurchased;\n        if (orders[0].makerAssetData.equals(ZRX_ASSET_DATA)) {\n            // If the makerAsset is ZRX, it is not necessary to pay fees out of this\n            // contracts's ZRX balance because fees are factored into the price of the order.\n            orderFillResults = marketBuyExactZrxWithWeth(\n                orders,\n                makerAssetFillAmount,\n                signatures\n            );\n            // The fee amount must be deducted from the amount transfered back to sender.\n            makerAssetAmountPurchased = safeSub(orderFillResults.makerAssetFilledAmount, orderFillResults.takerFeePaid);\n        } else {\n            // Attemp to purchase desired amount of makerAsset.\n            // ZRX fees are payed with this contract's balance.\n            orderFillResults = marketBuyExactAmountWithWeth(\n                orders,\n                makerAssetFillAmount,\n                signatures\n            );\n            // Buy back all ZRX spent on fees.\n            zrxBuyAmount = orderFillResults.takerFeePaid;\n            feeOrderFillResults = marketBuyExactZrxWithWeth(\n                feeOrders,\n                zrxBuyAmount,\n                feeSignatures\n            );\n            makerAssetAmountPurchased = orderFillResults.makerAssetFilledAmount;\n        }\n\n        // Transfer feePercentage of total ETH spent on primary orders to feeRecipient.\n        // Refund remaining ETH to msg.sender.\n        transferEthFeeAndRefund(\n            orderFillResults.takerAssetFilledAmount,\n            feeOrderFillResults.takerAssetFilledAmount,\n            feePercentage,\n            feeRecipient\n        );\n\n        // Transfer purchased assets to msg.sender.\n        transferAssetToSender(orders[0].makerAssetData, makerAssetAmountPurchased);\n    }\n}\n",
        "extensions/Forwarder/MixinWeth.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"../../protocol/Exchange/libs/LibMath.sol\";\nimport \"./libs/LibConstants.sol\";\nimport \"./mixins/MWeth.sol\";\n\n\ncontract MixinWeth is\n    LibMath,\n    LibConstants,\n    MWeth\n{\n    /// @dev Default payabale function, this allows us to withdraw WETH\n    function ()\n        public\n        payable\n    {\n        require(\n            msg.sender == address(ETHER_TOKEN),\n            \"DEFAULT_FUNCTION_WETH_CONTRACT_ONLY\"\n        );\n    }\n\n    /// @dev Converts message call's ETH value into WETH.\n    function convertEthToWeth()\n        internal\n    {\n        require(\n            msg.value > 0,\n            \"INVALID_MSG_VALUE\"\n        );\n        ETHER_TOKEN.deposit.value(msg.value)();\n    }\n\n    /// @dev Transfers feePercentage of WETH spent on primary orders to feeRecipient.\n    ///      Refunds any excess ETH to msg.sender.\n    /// @param wethSoldExcludingFeeOrders Amount of WETH sold when filling primary orders.\n    /// @param wethSoldForZrx Amount of WETH sold when purchasing ZRX required for primary order fees.\n    /// @param feePercentage Percentage of WETH sold that will payed as fee to forwarding contract feeRecipient.\n    /// @param feeRecipient Address that will receive ETH when orders are filled.\n    function transferEthFeeAndRefund(\n        uint256 wethSoldExcludingFeeOrders,\n        uint256 wethSoldForZrx,\n        uint256 feePercentage,\n        address feeRecipient\n    )\n        internal\n    {\n        // Ensure feePercentage is less than 5%.\n        require(\n            feePercentage <= MAX_FEE_PERCENTAGE,\n            \"FEE_PERCENTAGE_TOO_LARGE\"\n        );\n\n        // Ensure that no extra WETH owned by this contract has been sold.\n        uint256 wethSold = safeAdd(wethSoldExcludingFeeOrders, wethSoldForZrx);\n        require(\n            wethSold <= msg.value,\n            \"OVERSOLD_WETH\"\n        );\n\n        // Calculate amount of WETH that hasn't been sold.\n        uint256 wethRemaining = safeSub(msg.value, wethSold);\n\n        // Calculate ETH fee to pay to feeRecipient.\n        uint256 ethFee = getPartialAmountFloor(\n            feePercentage,\n            PERCENTAGE_DENOMINATOR,\n            wethSoldExcludingFeeOrders\n        );\n\n        // Ensure fee is less than amount of WETH remaining.\n        require(\n            ethFee <= wethRemaining,\n            \"INSUFFICIENT_ETH_REMAINING\"\n        );\n    \n        // Do nothing if no WETH remaining\n        if (wethRemaining > 0) {\n            // Convert remaining WETH to ETH\n            ETHER_TOKEN.withdraw(wethRemaining);\n\n            // Pay ETH to feeRecipient\n            if (ethFee > 0) {\n                feeRecipient.transfer(ethFee);\n            }\n\n            // Refund remaining ETH to msg.sender.\n            uint256 ethRefund = safeSub(wethRemaining, ethFee);\n            if (ethRefund > 0) {\n                msg.sender.transfer(ethRefund);\n            }\n        }\n    }\n}\n",
        "extensions/Forwarder/interfaces/IAssets.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\n\ncontract IAssets {\n\n    /// @dev Withdraws assets from this contract. The contract requires a ZRX balance in order to \n    ///      function optimally, and this function allows the ZRX to be withdrawn by owner. It may also be\n    ///      used to withdraw assets that were accidentally sent to this contract.\n    /// @param assetData Byte array encoded for the respective asset proxy.\n    /// @param amount Amount of ERC20 token to withdraw.\n    function withdrawAsset(\n        bytes assetData,\n        uint256 amount\n    )\n        external;\n}\n",
        "extensions/Forwarder/interfaces/IForwarderCore.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\npragma experimental ABIEncoderV2;\n\nimport \"../../../protocol/Exchange/libs/LibOrder.sol\";\nimport \"../../../protocol/Exchange/libs/LibFillResults.sol\";\n\n\ncontract IForwarderCore {\n\n    /// @dev Purchases as much of orders' makerAssets as possible by selling up to 95% of transaction's ETH value.\n    ///      Any ZRX required to pay fees for primary orders will automatically be purchased by this contract.\n    ///      5% of ETH value is reserved for paying fees to order feeRecipients (in ZRX) and forwarding contract feeRecipient (in ETH).\n    ///      Any ETH not spent will be refunded to sender.\n    /// @param orders Array of order specifications used containing desired makerAsset and WETH as takerAsset. \n    /// @param signatures Proofs that orders have been created by makers.\n    /// @param feeOrders Array of order specifications containing ZRX as makerAsset and WETH as takerAsset. Used to purchase ZRX for primary order fees.\n    /// @param feeSignatures Proofs that feeOrders have been created by makers.\n    /// @param feePercentage Percentage of WETH sold that will payed as fee to forwarding contract feeRecipient.\n    /// @param feeRecipient Address that will receive ETH when orders are filled.\n    /// @return Amounts filled and fees paid by maker and taker for both sets of orders.\n    function marketSellOrdersWithEth(\n        LibOrder.Order[] memory orders,\n        bytes[] memory signatures,\n        LibOrder.Order[] memory feeOrders,\n        bytes[] memory feeSignatures,\n        uint256  feePercentage,\n        address feeRecipient\n    )\n        public\n        payable\n        returns (\n            LibFillResults.FillResults memory orderFillResults,\n            LibFillResults.FillResults memory feeOrderFillResults\n        );\n\n    /// @dev Attempt to purchase makerAssetFillAmount of makerAsset by selling ETH provided with transaction.\n    ///      Any ZRX required to pay fees for primary orders will automatically be purchased by this contract.\n    ///      Any ETH not spent will be refunded to sender.\n    /// @param orders Array of order specifications used containing desired makerAsset and WETH as takerAsset. \n    /// @param makerAssetFillAmount Desired amount of makerAsset to purchase.\n    /// @param signatures Proofs that orders have been created by makers.\n    /// @param feeOrders Array of order specifications containing ZRX as makerAsset and WETH as takerAsset. Used to purchase ZRX for primary order fees.\n    /// @param feeSignatures Proofs that feeOrders have been created by makers.\n    /// @param feePercentage Percentage of WETH sold that will payed as fee to forwarding contract feeRecipient.\n    /// @param feeRecipient Address that will receive ETH when orders are filled.\n    /// @return Amounts filled and fees paid by maker and taker for both sets of orders.\n    function marketBuyOrdersWithEth(\n        LibOrder.Order[] memory orders,\n        uint256 makerAssetFillAmount,\n        bytes[] memory signatures,\n        LibOrder.Order[] memory feeOrders,\n        bytes[] memory feeSignatures,\n        uint256  feePercentage,\n        address feeRecipient\n    )\n        public\n        payable\n        returns (\n            LibFillResults.FillResults memory orderFillResults,\n            LibFillResults.FillResults memory feeOrderFillResults\n        );\n}\n",
        "extensions/Forwarder/libs/LibConstants.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"../../../utils/LibBytes/LibBytes.sol\";\nimport \"../../../protocol/Exchange/interfaces/IExchange.sol\";\nimport \"../../../tokens/EtherToken/IEtherToken.sol\";\nimport \"../../../tokens/ERC20Token/IERC20Token.sol\";\n\n\ncontract LibConstants {\n\n    using LibBytes for bytes;\n\n    bytes4 constant internal ERC20_DATA_ID = bytes4(keccak256(\"ERC20Token(address)\"));\n    bytes4 constant internal ERC721_DATA_ID = bytes4(keccak256(\"ERC721Token(address,uint256)\"));\n    uint256 constant internal MAX_UINT = 2**256 - 1;\n    uint256 constant internal PERCENTAGE_DENOMINATOR = 10**18; \n    uint256 constant internal MAX_FEE_PERCENTAGE = 5 * PERCENTAGE_DENOMINATOR / 100;         // 5%\n    uint256 constant internal MAX_WETH_FILL_PERCENTAGE = 95 * PERCENTAGE_DENOMINATOR / 100;  // 95%\n \n     // solhint-disable var-name-mixedcase\n    IExchange internal EXCHANGE;\n    IEtherToken internal ETHER_TOKEN;\n    IERC20Token internal ZRX_TOKEN;\n    bytes internal ZRX_ASSET_DATA;\n    bytes internal WETH_ASSET_DATA;\n    // solhint-enable var-name-mixedcase\n\n    constructor (\n        address _exchange,\n        bytes memory _zrxAssetData,\n        bytes memory _wethAssetData\n    )\n        public\n    {\n        EXCHANGE = IExchange(_exchange);\n        ZRX_ASSET_DATA = _zrxAssetData;\n        WETH_ASSET_DATA = _wethAssetData;\n\n        address etherToken = _wethAssetData.readAddress(16);\n        address zrxToken = _zrxAssetData.readAddress(16);\n        ETHER_TOKEN = IEtherToken(etherToken);\n        ZRX_TOKEN = IERC20Token(zrxToken);\n    }\n}\n",
        "extensions/Forwarder/mixins/MAssets.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"../interfaces/IAssets.sol\";\n\n\ncontract MAssets is\n    IAssets\n{\n    /// @dev Transfers given amount of asset to sender.\n    /// @param assetData Byte array encoded for the respective asset proxy.\n    /// @param amount Amount of asset to transfer to sender.\n    function transferAssetToSender(\n        bytes memory assetData,\n        uint256 amount\n    )\n        internal;\n\n    /// @dev Decodes ERC20 assetData and transfers given amount to sender.\n    /// @param assetData Byte array encoded for the respective asset proxy.\n    /// @param amount Amount of asset to transfer to sender.\n    function transferERC20Token(\n        bytes memory assetData,\n        uint256 amount\n    )\n        internal;\n\n    /// @dev Decodes ERC721 assetData and transfers given amount to sender.\n    /// @param assetData Byte array encoded for the respective asset proxy.\n    /// @param amount Amount of asset to transfer to sender.\n    function transferERC721Token(\n        bytes memory assetData,\n        uint256 amount\n    )\n        internal;\n}\n",
        "extensions/Forwarder/mixins/MExchangeWrapper.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\npragma experimental ABIEncoderV2;\n\nimport \"../../../protocol/Exchange/libs/LibOrder.sol\";\nimport \"../../../protocol/Exchange/libs/LibFillResults.sol\";\n\n\ncontract MExchangeWrapper {\n\n    /// @dev Fills the input order.\n    ///      Returns false if the transaction would otherwise revert.\n    /// @param order Order struct containing order specifications.\n    /// @param takerAssetFillAmount Desired amount of takerAsset to sell.\n    /// @param signature Proof that order has been created by maker.\n    /// @return Amounts filled and fees paid by maker and taker.\n    function fillOrderNoThrow(\n        LibOrder.Order memory order,\n        uint256 takerAssetFillAmount,\n        bytes memory signature\n    )\n        internal\n        returns (LibFillResults.FillResults memory fillResults);\n\n    /// @dev Synchronously executes multiple calls of fillOrder until total amount of WETH has been sold by taker.\n    ///      Returns false if the transaction would otherwise revert.\n    /// @param orders Array of order specifications.\n    /// @param wethSellAmount Desired amount of WETH to sell.\n    /// @param signatures Proofs that orders have been signed by makers.\n    /// @return Amounts filled and fees paid by makers and taker.\n    function marketSellWeth(\n        LibOrder.Order[] memory orders,\n        uint256 wethSellAmount,\n        bytes[] memory signatures\n    )\n        internal\n        returns (LibFillResults.FillResults memory totalFillResults);\n\n    /// @dev Synchronously executes multiple fill orders in a single transaction until total amount is bought by taker.\n    ///      Returns false if the transaction would otherwise revert.\n    ///      The asset being sold by taker must always be WETH.\n    /// @param orders Array of order specifications.\n    /// @param makerAssetFillAmount Desired amount of makerAsset to buy.\n    /// @param signatures Proofs that orders have been signed by makers.\n    /// @return Amounts filled and fees paid by makers and taker.\n    function marketBuyExactAmountWithWeth(\n        LibOrder.Order[] memory orders,\n        uint256 makerAssetFillAmount,\n        bytes[] memory signatures\n    )\n        internal\n        returns (LibFillResults.FillResults memory totalFillResults);\n\n    /// @dev Buys zrxBuyAmount of ZRX fee tokens, taking into account ZRX fees for each order. This will guarantee\n    ///      that at least zrxBuyAmount of ZRX is purchased (sometimes slightly over due to rounding issues).\n    ///      It is possible that a request to buy 200 ZRX will require purchasing 202 ZRX\n    ///      as 2 ZRX is required to purchase the 200 ZRX fee tokens. This guarantees at least 200 ZRX for future purchases.\n    ///      The asset being sold by taker must always be WETH. \n    /// @param orders Array of order specifications containing ZRX as makerAsset and WETH as takerAsset.\n    /// @param zrxBuyAmount Desired amount of ZRX to buy.\n    /// @param signatures Proofs that orders have been created by makers.\n    /// @return totalFillResults Amounts filled and fees paid by maker and taker.\n    function marketBuyExactZrxWithWeth(\n        LibOrder.Order[] memory orders,\n        uint256 zrxBuyAmount,\n        bytes[] memory signatures\n    )\n        internal\n        returns (LibFillResults.FillResults memory totalFillResults);\n}\n",
        "extensions/Forwarder/mixins/MWeth.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\n\ncontract MWeth {\n\n    /// @dev Converts message call's ETH value into WETH.\n    function convertEthToWeth()\n        internal;\n\n    /// @dev Transfers feePercentage of WETH spent on primary orders to feeRecipient.\n    ///      Refunds any excess ETH to msg.sender.\n    /// @param wethSoldExcludingFeeOrders Amount of WETH sold when filling primary orders.\n    /// @param wethSoldForZrx Amount of WETH sold when purchasing ZRX required for primary order fees.\n    /// @param feePercentage Percentage of WETH sold that will payed as fee to forwarding contract feeRecipient.\n    /// @param feeRecipient Address that will receive ETH when orders are filled.\n    function transferEthFeeAndRefund(\n        uint256 wethSoldExcludingFeeOrders,\n        uint256 wethSoldForZrx,\n        uint256 feePercentage,\n        address feeRecipient\n    )\n        internal;\n}\n",
        "extensions/OrderValidator/OrderValidator.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\npragma experimental ABIEncoderV2;\n\nimport \"../../protocol/Exchange/interfaces/IExchange.sol\";\nimport \"../../protocol/Exchange/libs/LibOrder.sol\";\nimport \"../../tokens/ERC20Token/IERC20Token.sol\";\nimport \"../../tokens/ERC721Token/IERC721Token.sol\";\nimport \"../../utils/LibBytes/LibBytes.sol\";\n\n\ncontract OrderValidator {\n\n    using LibBytes for bytes;\n\n    bytes4 constant internal ERC20_DATA_ID = bytes4(keccak256(\"ERC20Token(address)\"));\n    bytes4 constant internal ERC721_DATA_ID = bytes4(keccak256(\"ERC721Token(address,uint256)\"));\n\n    struct TraderInfo {\n        uint256 makerBalance;       // Maker's balance of makerAsset\n        uint256 makerAllowance;     // Maker's allowance to corresponding AssetProxy\n        uint256 takerBalance;       // Taker's balance of takerAsset\n        uint256 takerAllowance;     // Taker's allowance to corresponding AssetProxy\n        uint256 makerZrxBalance;    // Maker's balance of ZRX\n        uint256 makerZrxAllowance;  // Maker's allowance of ZRX to ERC20Proxy\n        uint256 takerZrxBalance;    // Taker's balance of ZRX\n        uint256 takerZrxAllowance;  // Taker's allowance of ZRX to ERC20Proxy\n    }\n\n    // solhint-disable var-name-mixedcase\n    IExchange internal EXCHANGE;\n    bytes internal ZRX_ASSET_DATA;\n    // solhint-enable var-name-mixedcase\n\n    constructor (address _exchange, bytes memory _zrxAssetData)\n        public\n    {\n        EXCHANGE = IExchange(_exchange);\n        ZRX_ASSET_DATA = _zrxAssetData;\n    }\n\n    /// @dev Fetches information for order and maker/taker of order.\n    /// @param order The order structure.\n    /// @param takerAddress Address that will be filling the order.\n    /// @return OrderInfo and TraderInfo instances for given order.\n    function getOrderAndTraderInfo(LibOrder.Order memory order, address takerAddress)\n        public\n        view\n        returns (LibOrder.OrderInfo memory orderInfo, TraderInfo memory traderInfo)\n    {\n        orderInfo = EXCHANGE.getOrderInfo(order);\n        traderInfo = getTraderInfo(order, takerAddress);\n        return (orderInfo, traderInfo);\n    }\n\n    /// @dev Fetches information for all passed in orders and the makers/takers of each order.\n    /// @param orders Array of order specifications.\n    /// @param takerAddresses Array of taker addresses corresponding to each order.\n    /// @return Arrays of OrderInfo and TraderInfo instances that correspond to each order.\n    function getOrdersAndTradersInfo(LibOrder.Order[] memory orders, address[] memory takerAddresses)\n        public\n        view\n        returns (LibOrder.OrderInfo[] memory ordersInfo, TraderInfo[] memory tradersInfo)\n    {\n        ordersInfo = EXCHANGE.getOrdersInfo(orders);\n        tradersInfo = getTradersInfo(orders, takerAddresses);\n        return (ordersInfo, tradersInfo);\n    }\n\n    /// @dev Fetches balance and allowances for maker and taker of order.\n    /// @param order The order structure.\n    /// @param takerAddress Address that will be filling the order.\n    /// @return Balances and allowances of maker and taker of order.\n    function getTraderInfo(LibOrder.Order memory order, address takerAddress)\n        public\n        view\n        returns (TraderInfo memory traderInfo)\n    {\n        (traderInfo.makerBalance, traderInfo.makerAllowance) = getBalanceAndAllowance(order.makerAddress, order.makerAssetData);\n        (traderInfo.takerBalance, traderInfo.takerAllowance) = getBalanceAndAllowance(takerAddress, order.takerAssetData);\n        bytes memory zrxAssetData = ZRX_ASSET_DATA;\n        (traderInfo.makerZrxBalance, traderInfo.makerZrxAllowance) = getBalanceAndAllowance(order.makerAddress, zrxAssetData);\n        (traderInfo.takerZrxBalance, traderInfo.takerZrxAllowance) = getBalanceAndAllowance(takerAddress, zrxAssetData);\n        return traderInfo;\n    }\n\n    /// @dev Fetches balances and allowances of maker and taker for each provided order.\n    /// @param orders Array of order specifications.\n    /// @param takerAddresses Array of taker addresses corresponding to each order.\n    /// @return Array of balances and allowances for maker and taker of each order.\n    function getTradersInfo(LibOrder.Order[] memory orders, address[] memory takerAddresses)\n        public\n        view\n        returns (TraderInfo[] memory)\n    {\n        uint256 ordersLength = orders.length;\n        TraderInfo[] memory tradersInfo = new TraderInfo[](ordersLength);\n        for (uint256 i = 0; i != ordersLength; i++) {\n            tradersInfo[i] = getTraderInfo(orders[i], takerAddresses[i]);\n        }\n        return tradersInfo;\n    }\n\n    /// @dev Fetches token balances and allowances of an address to given assetProxy. Supports ERC20 and ERC721.\n    /// @param target Address to fetch balances and allowances of.\n    /// @param assetData Encoded data that can be decoded by a specified proxy contract when transferring asset.\n    /// @return Balance of asset and allowance set to given proxy of asset.\n    ///         For ERC721 tokens, these values will always be 1 or 0.\n    function getBalanceAndAllowance(address target, bytes memory assetData)\n        public\n        view\n        returns (uint256 balance, uint256 allowance)\n    {\n        bytes4 assetProxyId = assetData.readBytes4(0);\n        address token = assetData.readAddress(16);\n        address assetProxy = EXCHANGE.getAssetProxy(assetProxyId);\n\n        if (assetProxyId == ERC20_DATA_ID) {\n            // Query balance\n            balance = IERC20Token(token).balanceOf(target);\n\n            // Query allowance\n            allowance = IERC20Token(token).allowance(target, assetProxy);\n        } else if (assetProxyId == ERC721_DATA_ID) {\n            uint256 tokenId = assetData.readUint256(36);\n\n            // Query owner of tokenId\n            address owner = getERC721TokenOwner(token, tokenId);\n\n            // Set balance to 1 if tokenId is owned by target\n            balance = target == owner ? 1 : 0;\n\n            // Check if ERC721Proxy is approved to spend tokenId\n            bool isApproved = IERC721Token(token).isApprovedForAll(target, assetProxy) || IERC721Token(token).getApproved(tokenId) == assetProxy;\n            \n            // Set alowance to 1 if ERC721Proxy is approved to spend tokenId\n            allowance = isApproved ? 1 : 0;\n        } else {\n            revert(\"UNSUPPORTED_ASSET_PROXY\");\n        }\n        return (balance, allowance);\n    }\n\n    /// @dev Fetches token balances and allowances of an address for each given assetProxy. Supports ERC20 and ERC721.\n    /// @param target Address to fetch balances and allowances of.\n    /// @param assetData Array of encoded byte arrays that can be decoded by a specified proxy contract when transferring asset.\n    /// @return Balances and allowances of assets.\n    ///         For ERC721 tokens, these values will always be 1 or 0.\n    function getBalancesAndAllowances(address target, bytes[] memory assetData)\n        public\n        view\n        returns (uint256[] memory, uint256[] memory)\n    {\n        uint256 length = assetData.length;\n        uint256[] memory balances = new uint256[](length);\n        uint256[] memory allowances = new uint256[](length);\n        for (uint256 i = 0; i != length; i++) {\n            (balances[i], allowances[i]) = getBalanceAndAllowance(target, assetData[i]);\n        }\n        return (balances, allowances);\n    }\n\n    /// @dev Calls `token.ownerOf(tokenId)`, but returns a null owner instead of reverting on an unowned token.\n    /// @param token Address of ERC721 token.\n    /// @param tokenId The identifier for the specific NFT.\n    /// @return Owner of tokenId or null address if unowned.\n    function getERC721TokenOwner(address token, uint256 tokenId)\n        public\n        view\n        returns (address owner)\n    {\n        assembly {\n            // load free memory pointer\n            let cdStart := mload(64)\n\n            // bytes4(keccak256(ownerOf(uint256))) = 0x6352211e\n            mstore(cdStart, 0x6352211e00000000000000000000000000000000000000000000000000000000)\n            mstore(add(cdStart, 4), tokenId)\n\n            // staticcall `ownerOf(tokenId)`\n            // `ownerOf` will revert if tokenId is not owned\n            let success := staticcall(\n                gas,      // forward all gas\n                token,    // call token contract\n                cdStart,  // start of calldata\n                36,       // length of input is 36 bytes\n                cdStart,  // write output over input\n                32        // size of output is 32 bytes\n            )\n\n            // Success implies that tokenId is owned\n            // Copy owner from return data if successful\n            if success {\n                owner := mload(cdStart)\n            }    \n        }\n\n        // Owner initialized to address(0), no need to modify if call is unsuccessful\n        return owner;\n    }\n}\n",
        "multisig/MultiSigWallet.sol": "// solhint-disable\npragma solidity ^0.4.15;\n\n\n/// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution.\n/// @author Stefan George - <stefan.george@consensys.net>\ncontract MultiSigWallet {\n\n    /*\n     *  Events\n     */\n    event Confirmation(address indexed sender, uint indexed transactionId);\n    event Revocation(address indexed sender, uint indexed transactionId);\n    event Submission(uint indexed transactionId);\n    event Execution(uint indexed transactionId);\n    event ExecutionFailure(uint indexed transactionId);\n    event Deposit(address indexed sender, uint value);\n    event OwnerAddition(address indexed owner);\n    event OwnerRemoval(address indexed owner);\n    event RequirementChange(uint required);\n\n    /*\n     *  Constants\n     */\n    uint constant public MAX_OWNER_COUNT = 50;\n\n    /*\n     *  Storage\n     */\n    mapping (uint => Transaction) public transactions;\n    mapping (uint => mapping (address => bool)) public confirmations;\n    mapping (address => bool) public isOwner;\n    address[] public owners;\n    uint public required;\n    uint public transactionCount;\n\n    struct Transaction {\n        address destination;\n        uint value;\n        bytes data;\n        bool executed;\n    }\n\n    /*\n     *  Modifiers\n     */\n    modifier onlyWallet() {\n        require(msg.sender == address(this));\n        _;\n    }\n\n    modifier ownerDoesNotExist(address owner) {\n        require(!isOwner[owner]);\n        _;\n    }\n\n    modifier ownerExists(address owner) {\n        require(isOwner[owner]);\n        _;\n    }\n\n    modifier transactionExists(uint transactionId) {\n        require(transactions[transactionId].destination != 0);\n        _;\n    }\n\n    modifier confirmed(uint transactionId, address owner) {\n        require(confirmations[transactionId][owner]);\n        _;\n    }\n\n    modifier notConfirmed(uint transactionId, address owner) {\n        require(!confirmations[transactionId][owner]);\n        _;\n    }\n\n    modifier notExecuted(uint transactionId) {\n        require(!transactions[transactionId].executed);\n        _;\n    }\n\n    modifier notNull(address _address) {\n        require(_address != 0);\n        _;\n    }\n\n    modifier validRequirement(uint ownerCount, uint _required) {\n        require(ownerCount <= MAX_OWNER_COUNT\n            && _required <= ownerCount\n            && _required != 0\n            && ownerCount != 0);\n        _;\n    }\n\n    /// @dev Fallback function allows to deposit ether.\n    function()\n        payable\n    {\n        if (msg.value > 0)\n            Deposit(msg.sender, msg.value);\n    }\n\n    /*\n     * Public functions\n     */\n    /// @dev Contract constructor sets initial owners and required number of confirmations.\n    /// @param _owners List of initial owners.\n    /// @param _required Number of required confirmations.\n    function MultiSigWallet(address[] _owners, uint _required)\n        public\n        validRequirement(_owners.length, _required)\n    {\n        for (uint i=0; i<_owners.length; i++) {\n            require(!isOwner[_owners[i]] && _owners[i] != 0);\n            isOwner[_owners[i]] = true;\n        }\n        owners = _owners;\n        required = _required;\n    }\n\n    /// @dev Allows to add a new owner. Transaction has to be sent by wallet.\n    /// @param owner Address of new owner.\n    function addOwner(address owner)\n        public\n        onlyWallet\n        ownerDoesNotExist(owner)\n        notNull(owner)\n        validRequirement(owners.length + 1, required)\n    {\n        isOwner[owner] = true;\n        owners.push(owner);\n        OwnerAddition(owner);\n    }\n\n    /// @dev Allows to remove an owner. Transaction has to be sent by wallet.\n    /// @param owner Address of owner.\n    function removeOwner(address owner)\n        public\n        onlyWallet\n        ownerExists(owner)\n    {\n        isOwner[owner] = false;\n        for (uint i=0; i<owners.length - 1; i++)\n            if (owners[i] == owner) {\n                owners[i] = owners[owners.length - 1];\n                break;\n            }\n        owners.length -= 1;\n        if (required > owners.length)\n            changeRequirement(owners.length);\n        OwnerRemoval(owner);\n    }\n\n    /// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet.\n    /// @param owner Address of owner to be replaced.\n    /// @param newOwner Address of new owner.\n    function replaceOwner(address owner, address newOwner)\n        public\n        onlyWallet\n        ownerExists(owner)\n        ownerDoesNotExist(newOwner)\n    {\n        for (uint i=0; i<owners.length; i++)\n            if (owners[i] == owner) {\n                owners[i] = newOwner;\n                break;\n            }\n        isOwner[owner] = false;\n        isOwner[newOwner] = true;\n        OwnerRemoval(owner);\n        OwnerAddition(newOwner);\n    }\n\n    /// @dev Allows to change the number of required confirmations. Transaction has to be sent by wallet.\n    /// @param _required Number of required confirmations.\n    function changeRequirement(uint _required)\n        public\n        onlyWallet\n        validRequirement(owners.length, _required)\n    {\n        required = _required;\n        RequirementChange(_required);\n    }\n\n    /// @dev Allows an owner to submit and confirm a transaction.\n    /// @param destination Transaction target address.\n    /// @param value Transaction ether value.\n    /// @param data Transaction data payload.\n    /// @return Returns transaction ID.\n    function submitTransaction(address destination, uint value, bytes data)\n        public\n        returns (uint transactionId)\n    {\n        transactionId = addTransaction(destination, value, data);\n        confirmTransaction(transactionId);\n    }\n\n    /// @dev Allows an owner to confirm a transaction.\n    /// @param transactionId Transaction ID.\n    function confirmTransaction(uint transactionId)\n        public\n        ownerExists(msg.sender)\n        transactionExists(transactionId)\n        notConfirmed(transactionId, msg.sender)\n    {\n        confirmations[transactionId][msg.sender] = true;\n        Confirmation(msg.sender, transactionId);\n        executeTransaction(transactionId);\n    }\n\n    /// @dev Allows an owner to revoke a confirmation for a transaction.\n    /// @param transactionId Transaction ID.\n    function revokeConfirmation(uint transactionId)\n        public\n        ownerExists(msg.sender)\n        confirmed(transactionId, msg.sender)\n        notExecuted(transactionId)\n    {\n        confirmations[transactionId][msg.sender] = false;\n        Revocation(msg.sender, transactionId);\n    }\n\n    /// @dev Allows anyone to execute a confirmed transaction.\n    /// @param transactionId Transaction ID.\n    function executeTransaction(uint transactionId)\n        public\n        ownerExists(msg.sender)\n        confirmed(transactionId, msg.sender)\n        notExecuted(transactionId)\n    {\n        if (isConfirmed(transactionId)) {\n            Transaction storage txn = transactions[transactionId];\n            txn.executed = true;\n            if (external_call(txn.destination, txn.value, txn.data.length, txn.data))\n                Execution(transactionId);\n            else {\n                ExecutionFailure(transactionId);\n                txn.executed = false;\n            }\n        }\n    }\n\n    // call has been separated into its own function in order to take advantage\n    // of the Solidity's code generator to produce a loop that copies tx.data into memory.\n    function external_call(address destination, uint value, uint dataLength, bytes data) internal returns (bool) {\n        bool result;\n        assembly {\n            let x := mload(0x40)   // \"Allocate\" memory for output (0x40 is where \"free memory\" pointer is stored by convention)\n            let d := add(data, 32) // First 32 bytes are the padded length of data, so exclude that\n            result := call(\n                sub(gas, 34710),   // 34710 is the value that solidity is currently emitting\n                                   // It includes callGas (700) + callVeryLow (3, to pay for SUB) + callValueTransferGas (9000) +\n                                   // callNewAccountGas (25000, in case the destination address does not exist and needs creating)\n                destination,\n                value,\n                d,\n                dataLength,        // Size of the input (in bytes) - this is what fixes the padding problem\n                x,\n                0                  // Output is ignored, therefore the output size is zero\n            )\n        }\n        return result;\n    }\n\n    /// @dev Returns the confirmation status of a transaction.\n    /// @param transactionId Transaction ID.\n    /// @return Confirmation status.\n    function isConfirmed(uint transactionId)\n        public\n        constant\n        returns (bool)\n    {\n        uint count = 0;\n        for (uint i=0; i<owners.length; i++) {\n            if (confirmations[transactionId][owners[i]])\n                count += 1;\n            if (count == required)\n                return true;\n        }\n    }\n\n    /*\n     * Internal functions\n     */\n    /// @dev Adds a new transaction to the transaction mapping, if transaction does not exist yet.\n    /// @param destination Transaction target address.\n    /// @param value Transaction ether value.\n    /// @param data Transaction data payload.\n    /// @return Returns transaction ID.\n    function addTransaction(address destination, uint value, bytes data)\n        internal\n        notNull(destination)\n        returns (uint transactionId)\n    {\n        transactionId = transactionCount;\n        transactions[transactionId] = Transaction({\n            destination: destination,\n            value: value,\n            data: data,\n            executed: false\n        });\n        transactionCount += 1;\n        Submission(transactionId);\n    }\n\n    /*\n     * Web3 call functions\n     */\n    /// @dev Returns number of confirmations of a transaction.\n    /// @param transactionId Transaction ID.\n    /// @return Number of confirmations.\n    function getConfirmationCount(uint transactionId)\n        public\n        constant\n        returns (uint count)\n    {\n        for (uint i=0; i<owners.length; i++)\n            if (confirmations[transactionId][owners[i]])\n                count += 1;\n    }\n\n    /// @dev Returns total number of transactions after filers are applied.\n    /// @param pending Include pending transactions.\n    /// @param executed Include executed transactions.\n    /// @return Total number of transactions after filters are applied.\n    function getTransactionCount(bool pending, bool executed)\n        public\n        constant\n        returns (uint count)\n    {\n        for (uint i=0; i<transactionCount; i++)\n            if (   pending && !transactions[i].executed\n                || executed && transactions[i].executed)\n                count += 1;\n    }\n\n    /// @dev Returns list of owners.\n    /// @return List of owner addresses.\n    function getOwners()\n        public\n        constant\n        returns (address[])\n    {\n        return owners;\n    }\n\n    /// @dev Returns array with owner addresses, which confirmed transaction.\n    /// @param transactionId Transaction ID.\n    /// @return Returns array of owner addresses.\n    function getConfirmations(uint transactionId)\n        public\n        constant\n        returns (address[] _confirmations)\n    {\n        address[] memory confirmationsTemp = new address[](owners.length);\n        uint count = 0;\n        uint i;\n        for (i=0; i<owners.length; i++)\n            if (confirmations[transactionId][owners[i]]) {\n                confirmationsTemp[count] = owners[i];\n                count += 1;\n            }\n        _confirmations = new address[](count);\n        for (i=0; i<count; i++)\n            _confirmations[i] = confirmationsTemp[i];\n    }\n\n    /// @dev Returns list of transaction IDs in defined range.\n    /// @param from Index start position of transaction array.\n    /// @param to Index end position of transaction array.\n    /// @param pending Include pending transactions.\n    /// @param executed Include executed transactions.\n    /// @return Returns array of transaction IDs.\n    function getTransactionIds(uint from, uint to, bool pending, bool executed)\n        public\n        constant\n        returns (uint[] _transactionIds)\n    {\n        uint[] memory transactionIdsTemp = new uint[](transactionCount);\n        uint count = 0;\n        uint i;\n        for (i=0; i<transactionCount; i++)\n            if (   pending && !transactions[i].executed\n                || executed && transactions[i].executed)\n            {\n                transactionIdsTemp[count] = i;\n                count += 1;\n            }\n        _transactionIds = new uint[](to - from);\n        for (i=from; i<to; i++)\n            _transactionIds[i - from] = transactionIdsTemp[i];\n    }\n}",
        "multisig/MultiSigWalletWithTimeLock.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"./MultiSigWallet.sol\";\n\n\n/// @title Multisignature wallet with time lock- Allows multiple parties to execute a transaction after a time lock has passed.\n/// @author Amir Bandeali - <amir@0xProject.com>\n// solhint-disable not-rely-on-time\ncontract MultiSigWalletWithTimeLock is\n    MultiSigWallet\n{\n    event ConfirmationTimeSet(uint256 indexed transactionId, uint256 confirmationTime);\n    event TimeLockChange(uint256 secondsTimeLocked);\n\n    uint256 public secondsTimeLocked;\n\n    mapping (uint256 => uint256) public confirmationTimes;\n\n    modifier notFullyConfirmed(uint256 transactionId) {\n        require(\n            !isConfirmed(transactionId),\n            \"TX_FULLY_CONFIRMED\"\n        );\n        _;\n    }\n\n    modifier fullyConfirmed(uint256 transactionId) {\n        require(\n            isConfirmed(transactionId),\n            \"TX_NOT_FULLY_CONFIRMED\"\n        );\n        _;\n    }\n\n    modifier pastTimeLock(uint256 transactionId) {\n        require(\n            block.timestamp >= confirmationTimes[transactionId] + secondsTimeLocked,\n            \"TIME_LOCK_INCOMPLETE\"\n        );\n        _;\n    }\n\n    /// @dev Contract constructor sets initial owners, required number of confirmations, and time lock.\n    /// @param _owners List of initial owners.\n    /// @param _required Number of required confirmations.\n    /// @param _secondsTimeLocked Duration needed after a transaction is confirmed and before it becomes executable, in seconds.\n    constructor (\n        address[] _owners,\n        uint256 _required,\n        uint256 _secondsTimeLocked\n    )\n        public\n        MultiSigWallet(_owners, _required)\n    {\n        secondsTimeLocked = _secondsTimeLocked;\n    }\n\n    /// @dev Changes the duration of the time lock for transactions.\n    /// @param _secondsTimeLocked Duration needed after a transaction is confirmed and before it becomes executable, in seconds.\n    function changeTimeLock(uint256 _secondsTimeLocked)\n        public\n        onlyWallet\n    {\n        secondsTimeLocked = _secondsTimeLocked;\n        emit TimeLockChange(_secondsTimeLocked);\n    }\n\n    /// @dev Allows an owner to confirm a transaction.\n    /// @param transactionId Transaction ID.\n    function confirmTransaction(uint256 transactionId)\n        public\n        ownerExists(msg.sender)\n        transactionExists(transactionId)\n        notConfirmed(transactionId, msg.sender)\n        notFullyConfirmed(transactionId)\n    {\n        confirmations[transactionId][msg.sender] = true;\n        emit Confirmation(msg.sender, transactionId);\n        if (isConfirmed(transactionId)) {\n            setConfirmationTime(transactionId, block.timestamp);\n        }\n    }\n\n    /// @dev Allows anyone to execute a confirmed transaction.\n    /// @param transactionId Transaction ID.\n    function executeTransaction(uint256 transactionId)\n        public\n        notExecuted(transactionId)\n        fullyConfirmed(transactionId)\n        pastTimeLock(transactionId)\n    {\n        Transaction storage txn = transactions[transactionId];\n        txn.executed = true;\n        if (external_call(txn.destination, txn.value, txn.data.length, txn.data)) {\n            emit Execution(transactionId);\n        } else {\n            emit ExecutionFailure(transactionId);\n            txn.executed = false;\n        }\n    }\n\n    /// @dev Sets the time of when a submission first passed.\n    function setConfirmationTime(uint256 transactionId, uint256 confirmationTime)\n        internal\n    {\n        confirmationTimes[transactionId] = confirmationTime;\n        emit ConfirmationTimeSet(transactionId, confirmationTime);\n    }\n}\n",
        "protocol/AssetProxy/ERC20Proxy.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"./MixinAuthorizable.sol\";\n\n\ncontract ERC20Proxy is\n    MixinAuthorizable\n{\n    // Id of this proxy.\n    bytes4 constant internal PROXY_ID = bytes4(keccak256(\"ERC20Token(address)\"));\n    \n    // solhint-disable-next-line payable-fallback\n    function () \n        external\n    {\n        assembly {\n            // The first 4 bytes of calldata holds the function selector\n            let selector := and(calldataload(0), 0xffffffff00000000000000000000000000000000000000000000000000000000)\n\n            // `transferFrom` will be called with the following parameters:\n            // assetData Encoded byte array.\n            // from Address to transfer asset from.\n            // to Address to transfer asset to.\n            // amount Amount of asset to transfer.\n            // bytes4(keccak256(\"transferFrom(bytes,address,address,uint256)\")) = 0xa85e59e4\n            if eq(selector, 0xa85e59e400000000000000000000000000000000000000000000000000000000) {\n\n                // To lookup a value in a mapping, we load from the storage location keccak256(k, p),\n                // where k is the key left padded to 32 bytes and p is the storage slot\n                let start := mload(64)\n                mstore(start, and(caller, 0xffffffffffffffffffffffffffffffffffffffff))\n                mstore(add(start, 32), authorized_slot)\n\n                // Revert if authorized[msg.sender] == false\n                if iszero(sload(keccak256(start, 64))) {\n                    // Revert with `Error(\"SENDER_NOT_AUTHORIZED\")`\n                    mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\n                    mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)\n                    mstore(64, 0x0000001553454e4445525f4e4f545f415554484f52495a454400000000000000)\n                    mstore(96, 0)\n                    revert(0, 100)\n                }\n\n                // `transferFrom`.\n                // The function is marked `external`, so no abi decodeding is done for\n                // us. Instead, we expect the `calldata` memory to contain the\n                // following:\n                //\n                // | Area     | Offset | Length  | Contents                            |\n                // |----------|--------|---------|-------------------------------------|\n                // | Header   | 0      | 4       | function selector                   |\n                // | Params   |        | 4 * 32  | function parameters:                |\n                // |          | 4      |         |   1. offset to assetData (*)        |\n                // |          | 36     |         |   2. from                           |\n                // |          | 68     |         |   3. to                             |\n                // |          | 100    |         |   4. amount                         |\n                // | Data     |        |         | assetData:                          |\n                // |          | 132    | 32      | assetData Length                    |\n                // |          | 164    | **      | assetData Contents                  |\n                //\n                // (*): offset is computed from start of function parameters, so offset\n                //      by an additional 4 bytes in the calldata.\n                //\n                // (**): see table below to compute length of assetData Contents\n                //\n                // WARNING: The ABIv2 specification allows additional padding between\n                //          the Params and Data section. This will result in a larger\n                //          offset to assetData.\n\n                // Asset data itself is encoded as follows:\n                //\n                // | Area     | Offset | Length  | Contents                            |\n                // |----------|--------|---------|-------------------------------------|\n                // | Header   | 0      | 4       | function selector                   |\n                // | Params   |        | 1 * 32  | function parameters:                |\n                // |          | 4      | 12 + 20 |   1. token address                  |\n\n                // We construct calldata for the `token.transferFrom` ABI.\n                // The layout of this calldata is in the table below.\n                //\n                // | Area     | Offset | Length  | Contents                            |\n                // |----------|--------|---------|-------------------------------------|\n                // | Header   | 0      | 4       | function selector                   |\n                // | Params   |        | 3 * 32  | function parameters:                |\n                // |          | 4      |         |   1. from                           |\n                // |          | 36     |         |   2. to                             |\n                // |          | 68     |         |   3. amount                         |\n\n                /////// Read token address from calldata ///////\n                // * The token address is stored in `assetData`.\n                //\n                // * The \"offset to assetData\" is stored at offset 4 in the calldata (table 1).\n                //   [assetDataOffsetFromParams = calldataload(4)]\n                //\n                // * Notes that the \"offset to assetData\" is relative to the \"Params\" area of calldata;\n                //   add 4 bytes to account for the length of the \"Header\" area (table 1).\n                //   [assetDataOffsetFromHeader = assetDataOffsetFromParams + 4]\n                //\n                // * The \"token address\" is offset 32+4=36 bytes into \"assetData\" (tables 1 & 2).\n                //   [tokenOffset = assetDataOffsetFromHeader + 36 = calldataload(4) + 4 + 36]\n                let token := calldataload(add(calldataload(4), 40))\n                \n                /////// Setup Header Area ///////\n                // This area holds the 4-byte `transferFrom` selector.\n                // Any trailing data in transferFromSelector will be\n                // overwritten in the next `mstore` call.\n                mstore(0, 0x23b872dd00000000000000000000000000000000000000000000000000000000)\n                \n                /////// Setup Params Area ///////\n                // We copy the fields `from`, `to` and `amount` in bulk\n                // from our own calldata to the new calldata.\n                calldatacopy(4, 36, 96)\n\n                /////// Call `token.transferFrom` using the calldata ///////\n                let success := call(\n                    gas,            // forward all gas\n                    token,          // call address of token contract\n                    0,              // don't send any ETH\n                    0,              // pointer to start of input\n                    100,            // length of input\n                    0,              // write output over input\n                    32              // output size should be 32 bytes\n                )\n\n                /////// Check return data. ///////\n                // If there is no return data, we assume the token incorrectly\n                // does not return a bool. In this case we expect it to revert\n                // on failure, which was handled above.\n                // If the token does return data, we require that it is a single\n                // nonzero 32 bytes value.\n                // So the transfer succeeded if the call succeeded and either\n                // returned nothing, or returned a non-zero 32 byte value. \n                success := and(success, or(\n                    iszero(returndatasize),\n                    and(\n                        eq(returndatasize, 32),\n                        gt(mload(0), 0)\n                    )\n                ))\n                if success {\n                    return(0, 0)\n                }\n                \n                // Revert with `Error(\"TRANSFER_FAILED\")`\n                mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\n                mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)\n                mstore(64, 0x0000000f5452414e534645525f4641494c454400000000000000000000000000)\n                mstore(96, 0)\n                revert(0, 100)\n            }\n\n            // Revert if undefined function is called\n            revert(0, 0)\n        }\n    }\n\n    /// @dev Gets the proxy id associated with the proxy address.\n    /// @return Proxy id.\n    function getProxyId()\n        external\n        pure\n        returns (bytes4)\n    {\n        return PROXY_ID;\n    }\n}\n",
        "protocol/AssetProxy/ERC721Proxy.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"./MixinAuthorizable.sol\";\n\n\ncontract ERC721Proxy is\n    MixinAuthorizable\n{\n    // Id of this proxy.\n    bytes4 constant internal PROXY_ID = bytes4(keccak256(\"ERC721Token(address,uint256)\"));\n\n    // solhint-disable-next-line payable-fallback\n    function () \n        external\n    {\n        assembly {\n            // The first 4 bytes of calldata holds the function selector\n            let selector := and(calldataload(0), 0xffffffff00000000000000000000000000000000000000000000000000000000)\n\n            // `transferFrom` will be called with the following parameters:\n            // assetData Encoded byte array.\n            // from Address to transfer asset from.\n            // to Address to transfer asset to.\n            // amount Amount of asset to transfer.\n            // bytes4(keccak256(\"transferFrom(bytes,address,address,uint256)\")) = 0xa85e59e4\n            if eq(selector, 0xa85e59e400000000000000000000000000000000000000000000000000000000) {\n\n                // To lookup a value in a mapping, we load from the storage location keccak256(k, p),\n                // where k is the key left padded to 32 bytes and p is the storage slot\n                let start := mload(64)\n                mstore(start, and(caller, 0xffffffffffffffffffffffffffffffffffffffff))\n                mstore(add(start, 32), authorized_slot)\n\n                // Revert if authorized[msg.sender] == false\n                if iszero(sload(keccak256(start, 64))) {\n                    // Revert with `Error(\"SENDER_NOT_AUTHORIZED\")`\n                    mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\n                    mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)\n                    mstore(64, 0x0000001553454e4445525f4e4f545f415554484f52495a454400000000000000)\n                    mstore(96, 0)\n                    revert(0, 100)\n                }\n\n                // `transferFrom`.\n                // The function is marked `external`, so no abi decodeding is done for\n                // us. Instead, we expect the `calldata` memory to contain the\n                // following:\n                //\n                // | Area     | Offset | Length  | Contents                            |\n                // |----------|--------|---------|-------------------------------------|\n                // | Header   | 0      | 4       | function selector                   |\n                // | Params   |        | 4 * 32  | function parameters:                |\n                // |          | 4      |         |   1. offset to assetData (*)        |\n                // |          | 36     |         |   2. from                           |\n                // |          | 68     |         |   3. to                             |\n                // |          | 100    |         |   4. amount                         |\n                // | Data     |        |         | assetData:                          |\n                // |          | 132    | 32      | assetData Length                    |\n                // |          | 164    | **      | assetData Contents                  |\n                //\n                // (*): offset is computed from start of function parameters, so offset\n                //      by an additional 4 bytes in the calldata.\n                //\n                // (**): see table below to compute length of assetData Contents\n                //\n                // WARNING: The ABIv2 specification allows additional padding between\n                //          the Params and Data section. This will result in a larger\n                //          offset to assetData.\n\n                // Asset data itself is encoded as follows:\n                //\n                // | Area     | Offset | Length  | Contents                            |\n                // |----------|--------|---------|-------------------------------------|\n                // | Header   | 0      | 4       | function selector                   |\n                // | Params   |        | 2 * 32  | function parameters:                |\n                // |          | 4      | 12 + 20 |   1. token address                  |\n                // |          | 36     |         |   2. tokenId                        |\n                \n                // We construct calldata for the `token.transferFrom` ABI.\n                // The layout of this calldata is in the table below.\n                // \n                // | Area     | Offset | Length  | Contents                            |\n                // |----------|--------|---------|-------------------------------------|\n                // | Header   | 0      | 4       | function selector                   |\n                // | Params   |        | 3 * 32  | function parameters:                |\n                // |          | 4      |         |   1. from                           |\n                // |          | 36     |         |   2. to                             |\n                // |          | 68     |         |   3. tokenId                        |\n\n                // There exists only 1 of each token.\n                // require(amount == 1, \"INVALID_AMOUNT\")\n                if sub(calldataload(100), 1) {\n                    // Revert with `Error(\"INVALID_AMOUNT\")`\n                    mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\n                    mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)\n                    mstore(64, 0x0000000e494e56414c49445f414d4f554e540000000000000000000000000000)\n                    mstore(96, 0)\n                    revert(0, 100)\n                }\n\n                /////// Setup Header Area ///////\n                // This area holds the 4-byte `transferFrom` selector.\n                // Any trailing data in transferFromSelector will be\n                // overwritten in the next `mstore` call.\n                mstore(0, 0x23b872dd00000000000000000000000000000000000000000000000000000000)\n                \n                /////// Setup Params Area ///////\n                // We copy the fields `from` and `to` in bulk\n                // from our own calldata to the new calldata.\n                calldatacopy(4, 36, 64)\n\n                // Copy `tokenId` field from our own calldata to the new calldata.\n                let assetDataOffset := calldataload(4)\n                calldatacopy(68, add(assetDataOffset, 72), 32)\n\n                /////// Call `token.transferFrom` using the calldata ///////\n                let token := calldataload(add(assetDataOffset, 40))\n                let success := call(\n                    gas,            // forward all gas\n                    token,          // call address of token contract\n                    0,              // don't send any ETH\n                    0,              // pointer to start of input\n                    100,            // length of input\n                    0,              // write output to null\n                    0               // output size is 0 bytes\n                )\n                if success {\n                    return(0, 0)\n                }\n                \n                // Revert with `Error(\"TRANSFER_FAILED\")`\n                mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\n                mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)\n                mstore(64, 0x0000000f5452414e534645525f4641494c454400000000000000000000000000)\n                mstore(96, 0)\n                revert(0, 100)\n            }\n\n            // Revert if undefined function is called\n            revert(0, 0)\n        }\n    }\n\n    /// @dev Gets the proxy id associated with the proxy address.\n    /// @return Proxy id.\n    function getProxyId()\n        external\n        pure\n        returns (bytes4)\n    {\n        return PROXY_ID;\n    }\n}\n",
        "protocol/AssetProxy/MixinAuthorizable.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"../../utils/Ownable/Ownable.sol\";\nimport \"./mixins/MAuthorizable.sol\";\n\n\ncontract MixinAuthorizable is\n    Ownable,\n    MAuthorizable\n{\n    /// @dev Only authorized addresses can invoke functions with this modifier.\n    modifier onlyAuthorized {\n        require(\n            authorized[msg.sender],\n            \"SENDER_NOT_AUTHORIZED\"\n        );\n        _;\n    }\n\n    mapping (address => bool) public authorized;\n    address[] public authorities;\n\n    /// @dev Authorizes an address.\n    /// @param target Address to authorize.\n    function addAuthorizedAddress(address target)\n        external\n        onlyOwner\n    {\n        require(\n            !authorized[target],\n            \"TARGET_ALREADY_AUTHORIZED\"\n        );\n\n        authorized[target] = true;\n        authorities.push(target);\n        emit AuthorizedAddressAdded(target, msg.sender);\n    }\n\n    /// @dev Removes authorizion of an address.\n    /// @param target Address to remove authorization from.\n    function removeAuthorizedAddress(address target)\n        external\n        onlyOwner\n    {\n        require(\n            authorized[target],\n            \"TARGET_NOT_AUTHORIZED\"\n        );\n\n        delete authorized[target];\n        for (uint256 i = 0; i < authorities.length; i++) {\n            if (authorities[i] == target) {\n                authorities[i] = authorities[authorities.length - 1];\n                authorities.length -= 1;\n                break;\n            }\n        }\n        emit AuthorizedAddressRemoved(target, msg.sender);\n    }\n\n    /// @dev Removes authorizion of an address.\n    /// @param target Address to remove authorization from.\n    /// @param index Index of target in authorities array.\n    function removeAuthorizedAddressAtIndex(\n        address target,\n        uint256 index\n    )\n        external\n        onlyOwner\n    {\n        require(\n            authorized[target],\n            \"TARGET_NOT_AUTHORIZED\"\n        );\n        require(\n            index < authorities.length,\n            \"INDEX_OUT_OF_BOUNDS\"\n        );\n        require(\n            authorities[index] == target,\n            \"AUTHORIZED_ADDRESS_MISMATCH\"\n        );\n\n        delete authorized[target];\n        authorities[index] = authorities[authorities.length - 1];\n        authorities.length -= 1;\n        emit AuthorizedAddressRemoved(target, msg.sender);\n    }\n\n    /// @dev Gets all authorized addresses.\n    /// @return Array of authorized addresses.\n    function getAuthorizedAddresses()\n        external\n        view\n        returns (address[] memory)\n    {\n        return authorities;\n    }\n}\n",
        "protocol/AssetProxy/interfaces/IAssetData.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\n// solhint-disable\npragma solidity 0.4.24;\n\n\n// @dev Interface of the asset proxy's assetData.\n// The asset proxies take an ABI encoded `bytes assetData` as argument.\n// This argument is ABI encoded as one of the methods of this interface.\ninterface IAssetData {\n\n    function ERC20Token(address tokenContract)\n        external\n        pure;\n    \n    function ERC721Token(\n        address tokenContract,\n        uint256 tokenId,\n        bytes receiverData\n    )\n        external\n        pure;\n    \n}\n",
        "protocol/AssetProxy/interfaces/IAssetProxy.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"./IAuthorizable.sol\";\n\n\ncontract IAssetProxy is\n    IAuthorizable\n{\n    /// @dev Transfers assets. Either succeeds or throws.\n    /// @param assetData Byte array encoded for the respective asset proxy.\n    /// @param from Address to transfer asset from.\n    /// @param to Address to transfer asset to.\n    /// @param amount Amount of asset to transfer.\n    function transferFrom(\n        bytes assetData,\n        address from,\n        address to,\n        uint256 amount\n    )\n        external;\n    \n    /// @dev Gets the proxy id associated with the proxy address.\n    /// @return Proxy id.\n    function getProxyId()\n        external\n        pure\n        returns (bytes4);\n}\n",
        "protocol/AssetProxy/interfaces/IAuthorizable.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"../../../utils/Ownable/IOwnable.sol\";\n\n\ncontract IAuthorizable is\n    IOwnable\n{\n    /// @dev Authorizes an address.\n    /// @param target Address to authorize.\n    function addAuthorizedAddress(address target)\n        external;\n\n    /// @dev Removes authorizion of an address.\n    /// @param target Address to remove authorization from.\n    function removeAuthorizedAddress(address target)\n        external;\n\n    /// @dev Removes authorizion of an address.\n    /// @param target Address to remove authorization from.\n    /// @param index Index of target in authorities array.\n    function removeAuthorizedAddressAtIndex(\n        address target,\n        uint256 index\n    )\n        external;\n    \n    /// @dev Gets all authorized addresses.\n    /// @return Array of authorized addresses.\n    function getAuthorizedAddresses()\n        external\n        view\n        returns (address[] memory);\n}\n",
        "protocol/AssetProxy/mixins/MAuthorizable.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"../interfaces/IAuthorizable.sol\";\n\n\ncontract MAuthorizable is\n    IAuthorizable\n{\n    // Event logged when a new address is authorized.\n    event AuthorizedAddressAdded(\n        address indexed target,\n        address indexed caller\n    );\n\n    // Event logged when a currently authorized address is unauthorized.\n    event AuthorizedAddressRemoved(\n        address indexed target,\n        address indexed caller\n    );\n\n    /// @dev Only authorized addresses can invoke functions with this modifier.\n    modifier onlyAuthorized { revert(); _; }\n}\n",
        "protocol/AssetProxyOwner/AssetProxyOwner.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"../../multisig/MultiSigWalletWithTimeLock.sol\";\nimport \"../../utils/LibBytes/LibBytes.sol\";\n\n\ncontract AssetProxyOwner is\n    MultiSigWalletWithTimeLock\n{\n    using LibBytes for bytes;\n\n    event AssetProxyRegistration(address assetProxyContract, bool isRegistered);\n\n    // Mapping of AssetProxy contract address =>\n    // if this contract is allowed to call the AssetProxy's `removeAuthorizedAddressAtIndex` method without a time lock.\n    mapping (address => bool) public isAssetProxyRegistered;\n\n    bytes4 constant internal REMOVE_AUTHORIZED_ADDRESS_AT_INDEX_SELECTOR = bytes4(keccak256(\"removeAuthorizedAddressAtIndex(address,uint256)\"));\n\n    /// @dev Function will revert if the transaction does not call `removeAuthorizedAddressAtIndex`\n    ///      on an approved AssetProxy contract.\n    modifier validRemoveAuthorizedAddressAtIndexTx(uint256 transactionId) {\n        Transaction storage txn = transactions[transactionId];\n        require(\n            isAssetProxyRegistered[txn.destination],\n            \"UNREGISTERED_ASSET_PROXY\"\n        );\n        require(\n            txn.data.readBytes4(0) == REMOVE_AUTHORIZED_ADDRESS_AT_INDEX_SELECTOR,\n            \"INVALID_FUNCTION_SELECTOR\"\n        );\n        _;\n    }\n\n    /// @dev Contract constructor sets initial owners, required number of confirmations,\n    ///      time lock, and list of AssetProxy addresses.\n    /// @param _owners List of initial owners.\n    /// @param _assetProxyContracts Array of AssetProxy contract addresses.\n    /// @param _required Number of required confirmations.\n    /// @param _secondsTimeLocked Duration needed after a transaction is confirmed and before it becomes executable, in seconds.\n    constructor (\n        address[] memory _owners,\n        address[] memory _assetProxyContracts,\n        uint256 _required,\n        uint256 _secondsTimeLocked\n    )\n        public\n        MultiSigWalletWithTimeLock(_owners, _required, _secondsTimeLocked)\n    {\n        for (uint256 i = 0; i < _assetProxyContracts.length; i++) {\n            address assetProxy = _assetProxyContracts[i];\n            require(\n                assetProxy != address(0),\n                \"INVALID_ASSET_PROXY\"\n            );\n            isAssetProxyRegistered[assetProxy] = true;\n        }\n    }\n\n    /// @dev Registers or deregisters an AssetProxy to be able to execute\n    ///      `removeAuthorizedAddressAtIndex` without a timelock.\n    /// @param assetProxyContract Address of AssetProxy contract.\n    /// @param isRegistered Status of approval for AssetProxy contract.\n    function registerAssetProxy(address assetProxyContract, bool isRegistered)\n        public\n        onlyWallet\n        notNull(assetProxyContract)\n    {\n        isAssetProxyRegistered[assetProxyContract] = isRegistered;\n        emit AssetProxyRegistration(assetProxyContract, isRegistered);\n    }\n\n    /// @dev Allows execution of `removeAuthorizedAddressAtIndex` without time lock.\n    /// @param transactionId Transaction ID.\n    function executeRemoveAuthorizedAddressAtIndex(uint256 transactionId)\n        public\n        notExecuted(transactionId)\n        fullyConfirmed(transactionId)\n        validRemoveAuthorizedAddressAtIndexTx(transactionId)\n    {\n        Transaction storage txn = transactions[transactionId];\n        txn.executed = true;\n        if (external_call(txn.destination, txn.value, txn.data.length, txn.data)) {\n            emit Execution(transactionId);\n        } else {\n            emit ExecutionFailure(transactionId);\n            txn.executed = false;\n        }\n    }\n}\n",
        "protocol/Exchange/Exchange.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\npragma experimental ABIEncoderV2;\n\nimport \"./libs/LibConstants.sol\";\nimport \"./MixinExchangeCore.sol\";\nimport \"./MixinSignatureValidator.sol\";\nimport \"./MixinWrapperFunctions.sol\";\nimport \"./MixinAssetProxyDispatcher.sol\";\nimport \"./MixinTransactions.sol\";\nimport \"./MixinMatchOrders.sol\";\n\n\n// solhint-disable no-empty-blocks\ncontract Exchange is\n    MixinExchangeCore,\n    MixinMatchOrders,\n    MixinSignatureValidator,\n    MixinTransactions,\n    MixinAssetProxyDispatcher,\n    MixinWrapperFunctions\n{\n    string constant public VERSION = \"2.0.1-alpha\";\n\n    // Mixins are instantiated in the order they are inherited\n    constructor (bytes memory _zrxAssetData)\n        public\n        LibConstants(_zrxAssetData) // @TODO: Remove when we deploy.\n        MixinExchangeCore()\n        MixinMatchOrders()\n        MixinSignatureValidator()\n        MixinTransactions()\n        MixinAssetProxyDispatcher()\n        MixinWrapperFunctions()\n    {}\n}\n",
        "protocol/Exchange/MixinAssetProxyDispatcher.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"../../utils/Ownable/Ownable.sol\";\nimport \"./mixins/MAssetProxyDispatcher.sol\";\nimport \"../AssetProxy/interfaces/IAssetProxy.sol\";\n\n\ncontract MixinAssetProxyDispatcher is\n    Ownable,\n    MAssetProxyDispatcher\n{\n    // Mapping from Asset Proxy Id's to their respective Asset Proxy\n    mapping (bytes4 => IAssetProxy) public assetProxies;\n\n    /// @dev Registers an asset proxy to its asset proxy id.\n    ///      Once an asset proxy is registered, it cannot be unregistered.\n    /// @param assetProxy Address of new asset proxy to register.\n    function registerAssetProxy(address assetProxy)\n        external\n        onlyOwner\n    {\n        IAssetProxy assetProxyContract = IAssetProxy(assetProxy);\n\n        // Ensure that no asset proxy exists with current id.\n        bytes4 assetProxyId = assetProxyContract.getProxyId();\n        address currentAssetProxy = assetProxies[assetProxyId];\n        require(\n            currentAssetProxy == address(0),\n            \"ASSET_PROXY_ALREADY_EXISTS\"\n        );\n\n        // Add asset proxy and log registration.\n        assetProxies[assetProxyId] = assetProxyContract;\n        emit AssetProxyRegistered(\n            assetProxyId,\n            assetProxy\n        );\n    }\n\n    /// @dev Gets an asset proxy.\n    /// @param assetProxyId Id of the asset proxy.\n    /// @return The asset proxy registered to assetProxyId. Returns 0x0 if no proxy is registered.\n    function getAssetProxy(bytes4 assetProxyId)\n        external\n        view\n        returns (address)\n    {\n        return assetProxies[assetProxyId];\n    }\n\n    /// @dev Forwards arguments to assetProxy and calls `transferFrom`. Either succeeds or throws.\n    /// @param assetData Byte array encoded for the asset.\n    /// @param from Address to transfer token from.\n    /// @param to Address to transfer token to.\n    /// @param amount Amount of token to transfer.\n    function dispatchTransferFrom(\n        bytes memory assetData,\n        address from,\n        address to,\n        uint256 amount\n    )\n        internal\n    {\n        // Do nothing if no amount should be transferred.\n        if (amount > 0 && from != to) {\n            // Ensure assetData length is valid\n            require(\n                assetData.length > 3,\n                \"LENGTH_GREATER_THAN_3_REQUIRED\"\n            );\n            \n            // Lookup assetProxy. We do not use `LibBytes.readBytes4` for gas efficiency reasons.\n            bytes4 assetProxyId;\n            assembly {\n                assetProxyId := and(mload(\n                    add(assetData, 32)),\n                    0xFFFFFFFF00000000000000000000000000000000000000000000000000000000\n                )\n            }\n            address assetProxy = assetProxies[assetProxyId];\n\n            // Ensure that assetProxy exists\n            require(\n                assetProxy != address(0),\n                \"ASSET_PROXY_DOES_NOT_EXIST\"\n            );\n            \n            // We construct calldata for the `assetProxy.transferFrom` ABI.\n            // The layout of this calldata is in the table below.\n            // \n            // | Area     | Offset | Length  | Contents                                    |\n            // | -------- |--------|---------|-------------------------------------------- |\n            // | Header   | 0      | 4       | function selector                           |\n            // | Params   |        | 4 * 32  | function parameters:                        |\n            // |          | 4      |         |   1. offset to assetData (*)                |\n            // |          | 36     |         |   2. from                                   |\n            // |          | 68     |         |   3. to                                     |\n            // |          | 100    |         |   4. amount                                 |\n            // | Data     |        |         | assetData:                                  |\n            // |          | 132    | 32      | assetData Length                            |\n            // |          | 164    | **      | assetData Contents                          |\n\n            assembly {\n                /////// Setup State ///////\n                // `cdStart` is the start of the calldata for `assetProxy.transferFrom` (equal to free memory ptr).\n                let cdStart := mload(64)\n                // `dataAreaLength` is the total number of words needed to store `assetData`\n                //  As-per the ABI spec, this value is padded up to the nearest multiple of 32,\n                //  and includes 32-bytes for length.\n                let dataAreaLength := and(add(mload(assetData), 63), 0xFFFFFFFFFFFE0)\n                // `cdEnd` is the end of the calldata for `assetProxy.transferFrom`.\n                let cdEnd := add(cdStart, add(132, dataAreaLength))\n\n                \n                /////// Setup Header Area ///////\n                // This area holds the 4-byte `transferFromSelector`.\n                // bytes4(keccak256(\"transferFrom(bytes,address,address,uint256)\")) = 0xa85e59e4\n                mstore(cdStart, 0xa85e59e400000000000000000000000000000000000000000000000000000000)\n                \n                /////// Setup Params Area ///////\n                // Each parameter is padded to 32-bytes. The entire Params Area is 128 bytes.\n                // Notes:\n                //   1. The offset to `assetData` is the length of the Params Area (128 bytes).\n                //   2. A 20-byte mask is applied to addresses to zero-out the unused bytes.\n                mstore(add(cdStart, 4), 128)\n                mstore(add(cdStart, 36), and(from, 0xffffffffffffffffffffffffffffffffffffffff))\n                mstore(add(cdStart, 68), and(to, 0xffffffffffffffffffffffffffffffffffffffff))\n                mstore(add(cdStart, 100), amount)\n                \n                /////// Setup Data Area ///////\n                // This area holds `assetData`.\n                let dataArea := add(cdStart, 132)\n                // solhint-disable-next-line no-empty-blocks\n                for {} lt(dataArea, cdEnd) {} {\n                    mstore(dataArea, mload(assetData))\n                    dataArea := add(dataArea, 32)\n                    assetData := add(assetData, 32)\n                }\n\n                /////// Call `assetProxy.transferFrom` using the constructed calldata ///////\n                let success := call(\n                    gas,                    // forward all gas\n                    assetProxy,             // call address of asset proxy\n                    0,                      // don't send any ETH\n                    cdStart,                // pointer to start of input\n                    sub(cdEnd, cdStart),    // length of input  \n                    cdStart,                // write output over input\n                    512                     // reserve 512 bytes for output\n                )\n                if iszero(success) {\n                    revert(cdStart, returndatasize())\n                }\n            }\n        }\n    }\n}\n",
        "protocol/Exchange/MixinExchangeCore.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\npragma experimental ABIEncoderV2;\n\nimport \"../../utils/ReentrancyGuard/ReentrancyGuard.sol\";\nimport \"./libs/LibConstants.sol\";\nimport \"./libs/LibFillResults.sol\";\nimport \"./libs/LibOrder.sol\";\nimport \"./libs/LibMath.sol\";\nimport \"./mixins/MExchangeCore.sol\";\nimport \"./mixins/MSignatureValidator.sol\";\nimport \"./mixins/MTransactions.sol\";\nimport \"./mixins/MAssetProxyDispatcher.sol\";\n\n\ncontract MixinExchangeCore is\n    ReentrancyGuard,\n    LibConstants,\n    LibMath,\n    LibOrder,\n    LibFillResults,\n    MAssetProxyDispatcher,\n    MExchangeCore,\n    MSignatureValidator,\n    MTransactions\n{\n    // Mapping of orderHash => amount of takerAsset already bought by maker\n    mapping (bytes32 => uint256) public filled;\n\n    // Mapping of orderHash => cancelled\n    mapping (bytes32 => bool) public cancelled;\n\n    // Mapping of makerAddress => senderAddress => lowest salt an order can have in order to be fillable\n    // Orders with specified senderAddress and with a salt less than their epoch are considered cancelled\n    mapping (address => mapping (address => uint256)) public orderEpoch;\n\n    /// @dev Cancels all orders created by makerAddress with a salt less than or equal to the targetOrderEpoch\n    ///      and senderAddress equal to msg.sender (or null address if msg.sender == makerAddress).\n    /// @param targetOrderEpoch Orders created with a salt less or equal to this value will be cancelled.\n    function cancelOrdersUpTo(uint256 targetOrderEpoch)\n        external\n        nonReentrant\n    {\n        address makerAddress = getCurrentContextAddress();\n        // If this function is called via `executeTransaction`, we only update the orderEpoch for the makerAddress/msg.sender combination.\n        // This allows external filter contracts to add rules to how orders are cancelled via this function.\n        address senderAddress = makerAddress == msg.sender ? address(0) : msg.sender;\n\n        // orderEpoch is initialized to 0, so to cancelUpTo we need salt + 1\n        uint256 newOrderEpoch = targetOrderEpoch + 1;  \n        uint256 oldOrderEpoch = orderEpoch[makerAddress][senderAddress];\n\n        // Ensure orderEpoch is monotonically increasing\n        require(\n            newOrderEpoch > oldOrderEpoch, \n            \"INVALID_NEW_ORDER_EPOCH\"\n        );\n\n        // Update orderEpoch\n        orderEpoch[makerAddress][senderAddress] = newOrderEpoch;\n        emit CancelUpTo(\n            makerAddress,\n            senderAddress,\n            newOrderEpoch\n        );\n    }\n\n    /// @dev Fills the input order.\n    /// @param order Order struct containing order specifications.\n    /// @param takerAssetFillAmount Desired amount of takerAsset to sell.\n    /// @param signature Proof that order has been created by maker.\n    /// @return Amounts filled and fees paid by maker and taker.\n    function fillOrder(\n        Order memory order,\n        uint256 takerAssetFillAmount,\n        bytes memory signature\n    )\n        public\n        nonReentrant\n        returns (FillResults memory fillResults)\n    {\n        fillResults = fillOrderInternal(\n            order,\n            takerAssetFillAmount,\n            signature\n        );\n        return fillResults;\n    }\n\n    /// @dev After calling, the order can not be filled anymore.\n    ///      Throws if order is invalid or sender does not have permission to cancel.\n    /// @param order Order to cancel. Order must be OrderStatus.FILLABLE.\n    function cancelOrder(Order memory order)\n        public\n        nonReentrant\n    {\n        cancelOrderInternal(order);\n    }\n\n    /// @dev Gets information about an order: status, hash, and amount filled.\n    /// @param order Order to gather information on.\n    /// @return OrderInfo Information about the order and its state.\n    ///         See LibOrder.OrderInfo for a complete description.\n    function getOrderInfo(Order memory order)\n        public\n        view\n        returns (OrderInfo memory orderInfo)\n    {\n        // Compute the order hash\n        orderInfo.orderHash = getOrderHash(order);\n\n        // Fetch filled amount\n        orderInfo.orderTakerAssetFilledAmount = filled[orderInfo.orderHash];\n\n        // If order.makerAssetAmount is zero, we also reject the order.\n        // While the Exchange contract handles them correctly, they create\n        // edge cases in the supporting infrastructure because they have\n        // an 'infinite' price when computed by a simple division.\n        if (order.makerAssetAmount == 0) {\n            orderInfo.orderStatus = uint8(OrderStatus.INVALID_MAKER_ASSET_AMOUNT);\n            return orderInfo;\n        }\n\n        // If order.takerAssetAmount is zero, then the order will always\n        // be considered filled because 0 == takerAssetAmount == orderTakerAssetFilledAmount\n        // Instead of distinguishing between unfilled and filled zero taker\n        // amount orders, we choose not to support them.\n        if (order.takerAssetAmount == 0) {\n            orderInfo.orderStatus = uint8(OrderStatus.INVALID_TAKER_ASSET_AMOUNT);\n            return orderInfo;\n        }\n\n        // Validate order availability\n        if (orderInfo.orderTakerAssetFilledAmount >= order.takerAssetAmount) {\n            orderInfo.orderStatus = uint8(OrderStatus.FULLY_FILLED);\n            return orderInfo;\n        }\n\n        // Validate order expiration\n        // solhint-disable-next-line not-rely-on-time\n        if (block.timestamp >= order.expirationTimeSeconds) {\n            orderInfo.orderStatus = uint8(OrderStatus.EXPIRED);\n            return orderInfo;\n        }\n\n        // Check if order has been cancelled\n        if (cancelled[orderInfo.orderHash]) {\n            orderInfo.orderStatus = uint8(OrderStatus.CANCELLED);\n            return orderInfo;\n        }\n        if (orderEpoch[order.makerAddress][order.senderAddress] > order.salt) {\n            orderInfo.orderStatus = uint8(OrderStatus.CANCELLED);\n            return orderInfo;\n        }\n\n        // All other statuses are ruled out: order is Fillable\n        orderInfo.orderStatus = uint8(OrderStatus.FILLABLE);\n        return orderInfo;\n    }\n\n    /// @dev Fills the input order.\n    /// @param order Order struct containing order specifications.\n    /// @param takerAssetFillAmount Desired amount of takerAsset to sell.\n    /// @param signature Proof that order has been created by maker.\n    /// @return Amounts filled and fees paid by maker and taker.\n    function fillOrderInternal(\n        Order memory order,\n        uint256 takerAssetFillAmount,\n        bytes memory signature\n    )\n        internal\n        returns (FillResults memory fillResults)\n    {\n        // Fetch order info\n        OrderInfo memory orderInfo = getOrderInfo(order);\n\n        // Fetch taker address\n        address takerAddress = getCurrentContextAddress();\n        \n        // Assert that the order is fillable by taker\n        assertFillableOrder(\n            order,\n            orderInfo,\n            takerAddress,\n            signature\n        );\n        \n        // Get amount of takerAsset to fill\n        uint256 remainingTakerAssetAmount = safeSub(order.takerAssetAmount, orderInfo.orderTakerAssetFilledAmount);\n        uint256 takerAssetFilledAmount = min256(takerAssetFillAmount, remainingTakerAssetAmount);\n\n        // Validate context\n        assertValidFill(\n            order,\n            orderInfo,\n            takerAssetFillAmount,\n            takerAssetFilledAmount,\n            fillResults.makerAssetFilledAmount\n        );\n\n        // Compute proportional fill amounts\n        fillResults = calculateFillResults(order, takerAssetFilledAmount);\n\n        // Update exchange internal state\n        updateFilledState(\n            order,\n            takerAddress,\n            orderInfo.orderHash,\n            orderInfo.orderTakerAssetFilledAmount,\n            fillResults\n        );\n    \n        // Settle order\n        settleOrder(\n            order,\n            takerAddress,\n            fillResults\n        );\n\n        return fillResults;\n    }\n\n    /// @dev After calling, the order can not be filled anymore.\n    ///      Throws if order is invalid or sender does not have permission to cancel.\n    /// @param order Order to cancel. Order must be OrderStatus.FILLABLE.\n    function cancelOrderInternal(Order memory order)\n        internal\n    {\n        // Fetch current order status\n        OrderInfo memory orderInfo = getOrderInfo(order);\n\n        // Validate context\n        assertValidCancel(order, orderInfo);\n\n        // Perform cancel\n        updateCancelledState(order, orderInfo.orderHash);\n    }\n\n    /// @dev Updates state with results of a fill order.\n    /// @param order that was filled.\n    /// @param takerAddress Address of taker who filled the order.\n    /// @param orderTakerAssetFilledAmount Amount of order already filled.\n    function updateFilledState(\n        Order memory order,\n        address takerAddress,\n        bytes32 orderHash,\n        uint256 orderTakerAssetFilledAmount,\n        FillResults memory fillResults\n    )\n        internal\n    {\n        // Update state\n        filled[orderHash] = safeAdd(orderTakerAssetFilledAmount, fillResults.takerAssetFilledAmount);\n\n        // Log order\n        emit Fill(\n            order.makerAddress,\n            order.feeRecipientAddress,\n            takerAddress,\n            msg.sender,\n            fillResults.makerAssetFilledAmount,\n            fillResults.takerAssetFilledAmount,\n            fillResults.makerFeePaid,\n            fillResults.takerFeePaid,\n            orderHash,\n            order.makerAssetData,\n            order.takerAssetData\n        );\n    }\n\n    /// @dev Updates state with results of cancelling an order.\n    ///      State is only updated if the order is currently fillable.\n    ///      Otherwise, updating state would have no effect.\n    /// @param order that was cancelled.\n    /// @param orderHash Hash of order that was cancelled.\n    function updateCancelledState(\n        Order memory order,\n        bytes32 orderHash\n    )\n        internal\n    {\n        // Perform cancel\n        cancelled[orderHash] = true;\n\n        // Log cancel\n        emit Cancel(\n            order.makerAddress,\n            order.feeRecipientAddress,\n            msg.sender,\n            orderHash,\n            order.makerAssetData,\n            order.takerAssetData\n        );\n    }\n    \n    /// @dev Validates context for fillOrder. Succeeds or throws.\n    /// @param order to be filled.\n    /// @param orderInfo OrderStatus, orderHash, and amount already filled of order.\n    /// @param takerAddress Address of order taker.\n    /// @param signature Proof that the orders was created by its maker.\n    function assertFillableOrder(\n        Order memory order,\n        OrderInfo memory orderInfo,\n        address takerAddress,\n        bytes memory signature\n    )\n        internal\n        view\n    {\n        // An order can only be filled if its status is FILLABLE.\n        require(\n            orderInfo.orderStatus == uint8(OrderStatus.FILLABLE),\n            \"ORDER_UNFILLABLE\"\n        );\n        \n        // Validate sender is allowed to fill this order\n        if (order.senderAddress != address(0)) {\n            require(\n                order.senderAddress == msg.sender,\n                \"INVALID_SENDER\"\n            );\n        }\n        \n        // Validate taker is allowed to fill this order\n        if (order.takerAddress != address(0)) {\n            require(\n                order.takerAddress == takerAddress,\n                \"INVALID_TAKER\"\n            );\n        }\n        \n        // Validate Maker signature (check only if first time seen)\n        if (orderInfo.orderTakerAssetFilledAmount == 0) {\n            require(\n                isValidSignature(\n                    orderInfo.orderHash,\n                    order.makerAddress,\n                    signature\n                ),\n                \"INVALID_ORDER_SIGNATURE\"\n            );\n        }\n    }\n    \n    /// @dev Validates context for fillOrder. Succeeds or throws.\n    /// @param order to be filled.\n    /// @param orderInfo OrderStatus, orderHash, and amount already filled of order.\n    /// @param takerAssetFillAmount Desired amount of order to fill by taker.\n    /// @param takerAssetFilledAmount Amount of takerAsset that will be filled.\n    /// @param makerAssetFilledAmount Amount of makerAsset that will be transfered.\n    function assertValidFill(\n        Order memory order,\n        OrderInfo memory orderInfo,\n        uint256 takerAssetFillAmount,  // TODO: use FillResults\n        uint256 takerAssetFilledAmount,\n        uint256 makerAssetFilledAmount\n    )\n        internal\n        view\n    {\n        // Revert if fill amount is invalid\n        // TODO: reconsider necessity for v2.1\n        require(\n            takerAssetFillAmount != 0,\n            \"INVALID_TAKER_AMOUNT\"\n        );\n        \n        // Make sure taker does not pay more than desired amount\n        // NOTE: This assertion should never fail, it is here\n        //       as an extra defence against potential bugs.\n        require(\n            takerAssetFilledAmount <= takerAssetFillAmount,\n            \"TAKER_OVERPAY\"\n        );\n        \n        // Make sure order is not overfilled\n        // NOTE: This assertion should never fail, it is here\n        //       as an extra defence against potential bugs.\n        require(\n            safeAdd(orderInfo.orderTakerAssetFilledAmount, takerAssetFilledAmount) <= order.takerAssetAmount,\n            \"ORDER_OVERFILL\"\n        );\n        \n        // Make sure order is filled at acceptable price.\n        // The order has an implied price from the makers perspective:\n        //    order price = order.makerAssetAmount / order.takerAssetAmount\n        // i.e. the number of makerAsset maker is paying per takerAsset. The\n        // maker is guaranteed to get this price or a better (lower) one. The\n        // actual price maker is getting in this fill is:\n        //    fill price = makerAssetFilledAmount / takerAssetFilledAmount\n        // We need `fill price <= order price` for the fill to be fair to maker.\n        // This amounts to:\n        //     makerAssetFilledAmount        order.makerAssetAmount\n        //    ------------------------  <=  -----------------------\n        //     takerAssetFilledAmount        order.takerAssetAmount\n        // or, equivalently:\n        //     makerAssetFilledAmount * order.takerAssetAmount <=\n        //     order.makerAssetAmount * takerAssetFilledAmount\n        // NOTE: This assertion should never fail, it is here\n        //       as an extra defence against potential bugs.\n        require(\n            safeMul(makerAssetFilledAmount, order.takerAssetAmount)\n            <= \n            safeMul(order.makerAssetAmount, takerAssetFilledAmount),\n            \"INVALID_FILL_PRICE\"\n        );\n    }\n\n    /// @dev Validates context for cancelOrder. Succeeds or throws.\n    /// @param order to be cancelled.\n    /// @param orderInfo OrderStatus, orderHash, and amount already filled of order.\n    function assertValidCancel(\n        Order memory order,\n        OrderInfo memory orderInfo\n    )\n        internal\n        view\n    {\n        // Ensure order is valid\n        // An order can only be cancelled if its status is FILLABLE.\n        require(\n            orderInfo.orderStatus == uint8(OrderStatus.FILLABLE),\n            \"ORDER_UNFILLABLE\"\n        );\n\n        // Validate sender is allowed to cancel this order\n        if (order.senderAddress != address(0)) {\n            require(\n                order.senderAddress == msg.sender,\n                \"INVALID_SENDER\"\n            );\n        }\n\n        // Validate transaction signed by maker\n        address makerAddress = getCurrentContextAddress();\n        require(\n            order.makerAddress == makerAddress,\n            \"INVALID_MAKER\"\n        );\n    }\n\n    /// @dev Calculates amounts filled and fees paid by maker and taker.\n    /// @param order to be filled.\n    /// @param takerAssetFilledAmount Amount of takerAsset that will be filled.\n    /// @return fillResults Amounts filled and fees paid by maker and taker.\n    function calculateFillResults(\n        Order memory order,\n        uint256 takerAssetFilledAmount\n    )\n        internal\n        pure\n        returns (FillResults memory fillResults)\n    {\n        // Compute proportional transfer amounts\n        fillResults.takerAssetFilledAmount = takerAssetFilledAmount;\n        fillResults.makerAssetFilledAmount = safeGetPartialAmountFloor(\n            takerAssetFilledAmount,\n            order.takerAssetAmount,\n            order.makerAssetAmount\n        );\n        fillResults.makerFeePaid = safeGetPartialAmountFloor(\n            fillResults.makerAssetFilledAmount,\n            order.makerAssetAmount,\n            order.makerFee\n        );\n        fillResults.takerFeePaid = safeGetPartialAmountFloor(\n            takerAssetFilledAmount,\n            order.takerAssetAmount,\n            order.takerFee\n        );\n\n        return fillResults;\n    }\n\n    /// @dev Settles an order by transferring assets between counterparties.\n    /// @param order Order struct containing order specifications.\n    /// @param takerAddress Address selling takerAsset and buying makerAsset.\n    /// @param fillResults Amounts to be filled and fees paid by maker and taker.\n    function settleOrder(\n        LibOrder.Order memory order,\n        address takerAddress,\n        LibFillResults.FillResults memory fillResults\n    )\n        private\n    {\n        bytes memory zrxAssetData = ZRX_ASSET_DATA;\n        dispatchTransferFrom(\n            order.makerAssetData,\n            order.makerAddress,\n            takerAddress,\n            fillResults.makerAssetFilledAmount\n        );\n        dispatchTransferFrom(\n            order.takerAssetData,\n            takerAddress,\n            order.makerAddress,\n            fillResults.takerAssetFilledAmount\n        );\n        dispatchTransferFrom(\n            zrxAssetData,\n            order.makerAddress,\n            order.feeRecipientAddress,\n            fillResults.makerFeePaid\n        );\n        dispatchTransferFrom(\n            zrxAssetData,\n            takerAddress,\n            order.feeRecipientAddress,\n            fillResults.takerFeePaid\n        );\n    }\n}\n",
        "protocol/Exchange/MixinMatchOrders.sol": "/*\n  Copyright 2018 ZeroEx Intl.\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    http://www.apache.org/licenses/LICENSE-2.0\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\npragma solidity 0.4.24;\npragma experimental ABIEncoderV2;\n\nimport \"../../utils/ReentrancyGuard/ReentrancyGuard.sol\";\nimport \"./libs/LibConstants.sol\";\nimport \"./libs/LibMath.sol\";\nimport \"./libs/LibOrder.sol\";\nimport \"./libs/LibFillResults.sol\";\nimport \"./mixins/MExchangeCore.sol\";\nimport \"./mixins/MMatchOrders.sol\";\nimport \"./mixins/MTransactions.sol\";\nimport \"./mixins/MAssetProxyDispatcher.sol\";\n\n\ncontract MixinMatchOrders is\n    ReentrancyGuard,\n    LibConstants,\n    LibMath,\n    MAssetProxyDispatcher,\n    MExchangeCore,\n    MMatchOrders,\n    MTransactions\n{\n    /// @dev Match two complementary orders that have a profitable spread.\n    ///      Each order is filled at their respective price point. However, the calculations are\n    ///      carried out as though the orders are both being filled at the right order's price point.\n    ///      The profit made by the left order goes to the taker (who matched the two orders).\n    /// @param leftOrder First order to match.\n    /// @param rightOrder Second order to match.\n    /// @param leftSignature Proof that order was created by the left maker.\n    /// @param rightSignature Proof that order was created by the right maker.\n    /// @return matchedFillResults Amounts filled and fees paid by maker and taker of matched orders.\n    function matchOrders(\n        LibOrder.Order memory leftOrder,\n        LibOrder.Order memory rightOrder,\n        bytes memory leftSignature,\n        bytes memory rightSignature\n    )\n        public\n        nonReentrant\n        returns (LibFillResults.MatchedFillResults memory matchedFillResults)\n    {\n        // We assume that rightOrder.takerAssetData == leftOrder.makerAssetData and rightOrder.makerAssetData == leftOrder.takerAssetData.\n        // If this assumption isn't true, the match will fail at signature validation.\n        rightOrder.makerAssetData = leftOrder.takerAssetData;\n        rightOrder.takerAssetData = leftOrder.makerAssetData;\n\n        // Get left & right order info\n        LibOrder.OrderInfo memory leftOrderInfo = getOrderInfo(leftOrder);\n        LibOrder.OrderInfo memory rightOrderInfo = getOrderInfo(rightOrder);\n\n        // Fetch taker address\n        address takerAddress = getCurrentContextAddress();\n        \n        // Either our context is valid or we revert\n        assertFillableOrder(\n            leftOrder,\n            leftOrderInfo,\n            takerAddress,\n            leftSignature\n        );\n        assertFillableOrder(\n            rightOrder,\n            rightOrderInfo,\n            takerAddress,\n            rightSignature\n        );\n        assertValidMatch(leftOrder, rightOrder);\n\n        // Compute proportional fill amounts\n        matchedFillResults = calculateMatchedFillResults(\n            leftOrder,\n            rightOrder,\n            leftOrderInfo.orderTakerAssetFilledAmount,\n            rightOrderInfo.orderTakerAssetFilledAmount\n        );\n\n        // Validate fill contexts\n        assertValidFill(\n            leftOrder,\n            leftOrderInfo,\n            matchedFillResults.left.takerAssetFilledAmount,\n            matchedFillResults.left.takerAssetFilledAmount,\n            matchedFillResults.left.makerAssetFilledAmount\n        );\n        assertValidFill(\n            rightOrder,\n            rightOrderInfo,\n            matchedFillResults.right.takerAssetFilledAmount,\n            matchedFillResults.right.takerAssetFilledAmount,\n            matchedFillResults.right.makerAssetFilledAmount\n        );\n        \n        // Update exchange state\n        updateFilledState(\n            leftOrder,\n            takerAddress,\n            leftOrderInfo.orderHash,\n            leftOrderInfo.orderTakerAssetFilledAmount,\n            matchedFillResults.left\n        );\n        updateFilledState(\n            rightOrder,\n            takerAddress,\n            rightOrderInfo.orderHash,\n            rightOrderInfo.orderTakerAssetFilledAmount,\n            matchedFillResults.right\n        );\n\n        // Settle matched orders. Succeeds or throws.\n        settleMatchedOrders(\n            leftOrder,\n            rightOrder,\n            takerAddress,\n            matchedFillResults\n        );\n\n        return matchedFillResults;\n    }\n\n    /// @dev Validates context for matchOrders. Succeeds or throws.\n    /// @param leftOrder First order to match.\n    /// @param rightOrder Second order to match.\n    function assertValidMatch(\n        LibOrder.Order memory leftOrder,\n        LibOrder.Order memory rightOrder\n    )\n        internal\n        pure\n    {\n        // Make sure there is a profitable spread.\n        // There is a profitable spread iff the cost per unit bought (OrderA.MakerAmount/OrderA.TakerAmount) for each order is greater\n        // than the profit per unit sold of the matched order (OrderB.TakerAmount/OrderB.MakerAmount).\n        // This is satisfied by the equations below:\n        // <leftOrder.makerAssetAmount> / <leftOrder.takerAssetAmount> >= <rightOrder.takerAssetAmount> / <rightOrder.makerAssetAmount>\n        // AND\n        // <rightOrder.makerAssetAmount> / <rightOrder.takerAssetAmount> >= <leftOrder.takerAssetAmount> / <leftOrder.makerAssetAmount>\n        // These equations can be combined to get the following:\n        require(\n            safeMul(leftOrder.makerAssetAmount, rightOrder.makerAssetAmount) >=\n            safeMul(leftOrder.takerAssetAmount, rightOrder.takerAssetAmount),\n            \"NEGATIVE_SPREAD_REQUIRED\"\n        );\n    }\n\n    /// @dev Calculates fill amounts for the matched orders.\n    ///      Each order is filled at their respective price point. However, the calculations are\n    ///      carried out as though the orders are both being filled at the right order's price point.\n    ///      The profit made by the leftOrder order goes to the taker (who matched the two orders).\n    /// @param leftOrder First order to match.\n    /// @param rightOrder Second order to match.\n    /// @param leftOrderTakerAssetFilledAmount Amount of left order already filled.\n    /// @param rightOrderTakerAssetFilledAmount Amount of right order already filled.\n    /// @param matchedFillResults Amounts to fill and fees to pay by maker and taker of matched orders.\n    function calculateMatchedFillResults(\n        LibOrder.Order memory leftOrder,\n        LibOrder.Order memory rightOrder,\n        uint256 leftOrderTakerAssetFilledAmount,\n        uint256 rightOrderTakerAssetFilledAmount\n    )\n        internal\n        pure\n        returns (LibFillResults.MatchedFillResults memory matchedFillResults)\n    {\n        // Derive maker asset amounts for left & right orders, given store taker assert amounts\n        uint256 leftTakerAssetAmountRemaining = safeSub(leftOrder.takerAssetAmount, leftOrderTakerAssetFilledAmount);\n        uint256 leftMakerAssetAmountRemaining = safeGetPartialAmountFloor(\n            leftOrder.makerAssetAmount,\n            leftOrder.takerAssetAmount,\n            leftTakerAssetAmountRemaining\n        );\n        uint256 rightTakerAssetAmountRemaining = safeSub(rightOrder.takerAssetAmount, rightOrderTakerAssetFilledAmount);\n        uint256 rightMakerAssetAmountRemaining = safeGetPartialAmountFloor(\n            rightOrder.makerAssetAmount,\n            rightOrder.takerAssetAmount,\n            rightTakerAssetAmountRemaining\n        );\n\n        // Calculate fill results for maker and taker assets: at least one order will be fully filled.\n        // The maximum amount the left maker can buy is `leftTakerAssetAmountRemaining`\n        // The maximum amount the right maker can sell is `rightMakerAssetAmountRemaining`\n        // We have two distinct cases for calculating the fill results:\n        // Case 1.\n        //   If the left maker can buy more than the right maker can sell, then only the right order is fully filled.\n        //   If the left maker can buy exactly what the right maker can sell, then both orders are fully filled.\n        // Case 2.\n        //   If the left maker cannot buy more than the right maker can sell, then only the left order is fully filled.\n        if (leftTakerAssetAmountRemaining >= rightMakerAssetAmountRemaining) {\n            // Case 1: Right order is fully filled\n            matchedFillResults.right.makerAssetFilledAmount = rightMakerAssetAmountRemaining;\n            matchedFillResults.right.takerAssetFilledAmount = rightTakerAssetAmountRemaining;\n            matchedFillResults.left.takerAssetFilledAmount = matchedFillResults.right.makerAssetFilledAmount;\n            // Round down to ensure the maker's exchange rate does not exceed the price specified by the order. \n            // We favor the maker when the exchange rate must be rounded.\n            matchedFillResults.left.makerAssetFilledAmount = safeGetPartialAmountFloor(\n                leftOrder.makerAssetAmount,\n                leftOrder.takerAssetAmount,\n                matchedFillResults.left.takerAssetFilledAmount\n            );\n        } else {\n            // Case 2: Left order is fully filled\n            matchedFillResults.left.makerAssetFilledAmount = leftMakerAssetAmountRemaining;\n            matchedFillResults.left.takerAssetFilledAmount = leftTakerAssetAmountRemaining;\n            matchedFillResults.right.makerAssetFilledAmount = matchedFillResults.left.takerAssetFilledAmount;\n            // Round up to ensure the maker's exchange rate does not exceed the price specified by the order.\n            // We favor the maker when the exchange rate must be rounded.\n            matchedFillResults.right.takerAssetFilledAmount = safeGetPartialAmountCeil(\n                rightOrder.takerAssetAmount,\n                rightOrder.makerAssetAmount,\n                matchedFillResults.right.makerAssetFilledAmount\n            );\n        }\n\n        // Calculate amount given to taker\n        matchedFillResults.leftMakerAssetSpreadAmount = safeSub(\n            matchedFillResults.left.makerAssetFilledAmount,\n            matchedFillResults.right.takerAssetFilledAmount\n        );\n\n        // Compute fees for left order\n        matchedFillResults.left.makerFeePaid = safeGetPartialAmountFloor(\n            matchedFillResults.left.makerAssetFilledAmount,\n            leftOrder.makerAssetAmount,\n            leftOrder.makerFee\n        );\n        matchedFillResults.left.takerFeePaid = safeGetPartialAmountFloor(\n            matchedFillResults.left.takerAssetFilledAmount,\n            leftOrder.takerAssetAmount,\n            leftOrder.takerFee\n        );\n\n        // Compute fees for right order\n        matchedFillResults.right.makerFeePaid = safeGetPartialAmountFloor(\n            matchedFillResults.right.makerAssetFilledAmount,\n            rightOrder.makerAssetAmount,\n            rightOrder.makerFee\n        );\n        matchedFillResults.right.takerFeePaid = safeGetPartialAmountFloor(\n            matchedFillResults.right.takerAssetFilledAmount,\n            rightOrder.takerAssetAmount,\n            rightOrder.takerFee\n        );\n\n        // Return fill results\n        return matchedFillResults;\n    }\n\n    /// @dev Settles matched order by transferring appropriate funds between order makers, taker, and fee recipient.\n    /// @param leftOrder First matched order.\n    /// @param rightOrder Second matched order.\n    /// @param takerAddress Address that matched the orders. The taker receives the spread between orders as profit.\n    /// @param matchedFillResults Struct holding amounts to transfer between makers, taker, and fee recipients.\n    function settleMatchedOrders(\n        LibOrder.Order memory leftOrder,\n        LibOrder.Order memory rightOrder,\n        address takerAddress,\n        LibFillResults.MatchedFillResults memory matchedFillResults\n    )\n        private\n    {\n        bytes memory zrxAssetData = ZRX_ASSET_DATA;\n        // Order makers and taker\n        dispatchTransferFrom(\n            leftOrder.makerAssetData,\n            leftOrder.makerAddress,\n            rightOrder.makerAddress,\n            matchedFillResults.right.takerAssetFilledAmount\n        );\n        dispatchTransferFrom(\n            rightOrder.makerAssetData,\n            rightOrder.makerAddress,\n            leftOrder.makerAddress,\n            matchedFillResults.left.takerAssetFilledAmount\n        );\n        dispatchTransferFrom(\n            leftOrder.makerAssetData,\n            leftOrder.makerAddress,\n            takerAddress,\n            matchedFillResults.leftMakerAssetSpreadAmount\n        );\n\n        // Maker fees\n        dispatchTransferFrom(\n            zrxAssetData,\n            leftOrder.makerAddress,\n            leftOrder.feeRecipientAddress,\n            matchedFillResults.left.makerFeePaid\n        );\n        dispatchTransferFrom(\n            zrxAssetData,\n            rightOrder.makerAddress,\n            rightOrder.feeRecipientAddress,\n            matchedFillResults.right.makerFeePaid\n        );\n\n        // Taker fees\n        if (leftOrder.feeRecipientAddress == rightOrder.feeRecipientAddress) {\n            dispatchTransferFrom(\n                zrxAssetData,\n                takerAddress,\n                leftOrder.feeRecipientAddress,\n                safeAdd(\n                    matchedFillResults.left.takerFeePaid,\n                    matchedFillResults.right.takerFeePaid\n                )\n            );\n        } else {\n            dispatchTransferFrom(\n                zrxAssetData,\n                takerAddress,\n                leftOrder.feeRecipientAddress,\n                matchedFillResults.left.takerFeePaid\n            );\n            dispatchTransferFrom(\n                zrxAssetData,\n                takerAddress,\n                rightOrder.feeRecipientAddress,\n                matchedFillResults.right.takerFeePaid\n            );\n        }\n    }\n}\n",
        "protocol/Exchange/MixinSignatureValidator.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"../../utils/LibBytes/LibBytes.sol\";\nimport \"../../utils/ReentrancyGuard/ReentrancyGuard.sol\";\nimport \"./mixins/MSignatureValidator.sol\";\nimport \"./mixins/MTransactions.sol\";\nimport \"./interfaces/IWallet.sol\";\nimport \"./interfaces/IValidator.sol\";\n\n\ncontract MixinSignatureValidator is\n    ReentrancyGuard,\n    MSignatureValidator,\n    MTransactions\n{\n    using LibBytes for bytes;\n    \n    // Mapping of hash => signer => signed\n    mapping (bytes32 => mapping (address => bool)) public preSigned;\n\n    // Mapping of signer => validator => approved\n    mapping (address => mapping (address => bool)) public allowedValidators;\n\n    /// @dev Approves a hash on-chain using any valid signature type.\n    ///      After presigning a hash, the preSign signature type will become valid for that hash and signer.\n    /// @param signerAddress Address that should have signed the given hash.\n    /// @param signature Proof that the hash has been signed by signer.\n    function preSign(\n        bytes32 hash,\n        address signerAddress,\n        bytes signature\n    )\n        external\n    {\n        if (signerAddress != msg.sender) {\n            require(\n                isValidSignature(\n                    hash,\n                    signerAddress,\n                    signature\n                ),\n                \"INVALID_SIGNATURE\"\n            );\n        }\n        preSigned[hash][signerAddress] = true;\n    }\n\n    /// @dev Approves/unnapproves a Validator contract to verify signatures on signer's behalf.\n    /// @param validatorAddress Address of Validator contract.\n    /// @param approval Approval or disapproval of  Validator contract.\n    function setSignatureValidatorApproval(\n        address validatorAddress,\n        bool approval\n    )\n        external\n        nonReentrant\n    {\n        address signerAddress = getCurrentContextAddress();\n        allowedValidators[signerAddress][validatorAddress] = approval;\n        emit SignatureValidatorApproval(\n            signerAddress,\n            validatorAddress,\n            approval\n        );\n    }\n\n    /// @dev Verifies that a hash has been signed by the given signer.\n    /// @param hash Any 32 byte hash.\n    /// @param signerAddress Address that should have signed the given hash.\n    /// @param signature Proof that the hash has been signed by signer.\n    /// @return True if the address recovered from the provided signature matches the input signer address.\n    function isValidSignature(\n        bytes32 hash,\n        address signerAddress,\n        bytes memory signature\n    )\n        public\n        view\n        returns (bool isValid)\n    {\n        require(\n            signature.length > 0,\n            \"LENGTH_GREATER_THAN_0_REQUIRED\"\n        );\n\n        // Pop last byte off of signature byte array.\n        uint8 signatureTypeRaw = uint8(signature.popLastByte());\n\n        // Ensure signature is supported\n        require(\n            signatureTypeRaw < uint8(SignatureType.NSignatureTypes),\n            \"SIGNATURE_UNSUPPORTED\"\n        );\n\n        SignatureType signatureType = SignatureType(signatureTypeRaw);\n\n        // Variables are not scoped in Solidity.\n        uint8 v;\n        bytes32 r;\n        bytes32 s;\n        address recovered;\n\n        // Always illegal signature.\n        // This is always an implicit option since a signer can create a\n        // signature array with invalid type or length. We may as well make\n        // it an explicit option. This aids testing and analysis. It is\n        // also the initialization value for the enum type.\n        if (signatureType == SignatureType.Illegal) {\n            revert(\"SIGNATURE_ILLEGAL\");\n\n        // Always invalid signature.\n        // Like Illegal, this is always implicitly available and therefore\n        // offered explicitly. It can be implicitly created by providing\n        // a correctly formatted but incorrect signature.\n        } else if (signatureType == SignatureType.Invalid) {\n            require(\n                signature.length == 0,\n                \"LENGTH_0_REQUIRED\"\n            );\n            isValid = false;\n            return isValid;\n\n        // Signature using EIP712\n        } else if (signatureType == SignatureType.EIP712) {\n            require(\n                signature.length == 65,\n                \"LENGTH_65_REQUIRED\"\n            );\n            v = uint8(signature[0]);\n            r = signature.readBytes32(1);\n            s = signature.readBytes32(33);\n            recovered = ecrecover(\n                hash,\n                v,\n                r,\n                s\n            );\n            isValid = signerAddress == recovered;\n            return isValid;\n\n        // Signed using web3.eth_sign\n        } else if (signatureType == SignatureType.EthSign) {\n            require(\n                signature.length == 65,\n                \"LENGTH_65_REQUIRED\"\n            );\n            v = uint8(signature[0]);\n            r = signature.readBytes32(1);\n            s = signature.readBytes32(33);\n            recovered = ecrecover(\n                keccak256(abi.encodePacked(\n                    \"\\x19Ethereum Signed Message:\\n32\",\n                    hash\n                )),\n                v,\n                r,\n                s\n            );\n            isValid = signerAddress == recovered;\n            return isValid;\n\n        // Signature verified by wallet contract.\n        // If used with an order, the maker of the order is the wallet contract.\n        } else if (signatureType == SignatureType.Wallet) {\n            isValid = isValidWalletSignature(\n                hash,\n                signerAddress,\n                signature\n            );\n            return isValid;\n\n        // Signature verified by validator contract.\n        // If used with an order, the maker of the order can still be an EOA.\n        // A signature using this type should be encoded as:\n        // | Offset   | Length | Contents                        |\n        // | 0x00     | x      | Signature to validate           |\n        // | 0x00 + x | 20     | Address of validator contract   |\n        // | 0x14 + x | 1      | Signature type is always \"\\x06\" |\n        } else if (signatureType == SignatureType.Validator) {\n            // Pop last 20 bytes off of signature byte array.\n            address validatorAddress = signature.popLast20Bytes();\n            \n            // Ensure signer has approved validator.\n            if (!allowedValidators[signerAddress][validatorAddress]) {\n                return false;\n            }\n            isValid = isValidValidatorSignature(\n                validatorAddress,\n                hash,\n                signerAddress,\n                signature\n            );\n            return isValid;\n\n        // Signer signed hash previously using the preSign function.\n        } else if (signatureType == SignatureType.PreSigned) {\n            isValid = preSigned[hash][signerAddress];\n            return isValid;\n        }\n\n        // Anything else is illegal (We do not return false because\n        // the signature may actually be valid, just not in a format\n        // that we currently support. In this case returning false\n        // may lead the caller to incorrectly believe that the\n        // signature was invalid.)\n        revert(\"SIGNATURE_UNSUPPORTED\");\n    }\n\n    /// @dev Verifies signature using logic defined by Wallet contract.\n    /// @param hash Any 32 byte hash.\n    /// @param walletAddress Address that should have signed the given hash\n    ///                      and defines its own signature verification method.\n    /// @param signature Proof that the hash has been signed by signer.\n    /// @return True if signature is valid for given wallet..\n    function isValidWalletSignature(\n        bytes32 hash,\n        address walletAddress,\n        bytes signature\n    )\n        internal\n        view\n        returns (bool isValid)\n    {\n        bytes memory calldata = abi.encodeWithSelector(\n            IWallet(walletAddress).isValidSignature.selector,\n            hash,\n            signature\n        );\n        assembly {\n            let cdStart := add(calldata, 32)\n            let success := staticcall(\n                gas,              // forward all gas\n                walletAddress,    // address of Wallet contract\n                cdStart,          // pointer to start of input\n                mload(calldata),  // length of input\n                cdStart,          // write output over input\n                32                // output size is 32 bytes\n            )\n\n            switch success\n            case 0 {\n                // Revert with `Error(\"WALLET_ERROR\")`\n                mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\n                mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)\n                mstore(64, 0x0000000c57414c4c45545f4552524f5200000000000000000000000000000000)\n                mstore(96, 0)\n                revert(0, 100)\n            }\n            case 1 {\n                // Signature is valid if call did not revert and returned true\n                isValid := mload(cdStart)\n            }\n        }\n        return isValid;\n    }\n\n    /// @dev Verifies signature using logic defined by Validator contract.\n    /// @param validatorAddress Address of validator contract.\n    /// @param hash Any 32 byte hash.\n    /// @param signerAddress Address that should have signed the given hash.\n    /// @param signature Proof that the hash has been signed by signer.\n    /// @return True if the address recovered from the provided signature matches the input signer address.\n    function isValidValidatorSignature(\n        address validatorAddress,\n        bytes32 hash,\n        address signerAddress,\n        bytes signature\n    )\n        internal\n        view\n        returns (bool isValid)\n    {\n        bytes memory calldata = abi.encodeWithSelector(\n            IValidator(signerAddress).isValidSignature.selector,\n            hash,\n            signerAddress,\n            signature\n        );\n        assembly {\n            let cdStart := add(calldata, 32)\n            let success := staticcall(\n                gas,               // forward all gas\n                validatorAddress,  // address of Validator contract\n                cdStart,           // pointer to start of input\n                mload(calldata),   // length of input\n                cdStart,           // write output over input\n                32                 // output size is 32 bytes\n            )\n\n            switch success\n            case 0 {\n                // Revert with `Error(\"VALIDATOR_ERROR\")`\n                mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\n                mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)\n                mstore(64, 0x0000000f56414c494441544f525f4552524f5200000000000000000000000000)\n                mstore(96, 0)\n                revert(0, 100)\n            }\n            case 1 {\n                // Signature is valid if call did not revert and returned true\n                isValid := mload(cdStart)\n            }\n        }\n        return isValid;\n    }\n}\n",
        "protocol/Exchange/MixinTransactions.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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*/\npragma solidity 0.4.24;\n\nimport \"./libs/LibExchangeErrors.sol\";\nimport \"./mixins/MSignatureValidator.sol\";\nimport \"./mixins/MTransactions.sol\";\nimport \"./libs/LibEIP712.sol\";\n\n\ncontract MixinTransactions is\n    LibEIP712,\n    MSignatureValidator,\n    MTransactions\n{\n    // Mapping of transaction hash => executed\n    // This prevents transactions from being executed more than once.\n    mapping (bytes32 => bool) public transactions;\n\n    // Address of current transaction signer\n    address public currentContextAddress;\n\n    /// @dev Executes an exchange method call in the context of signer.\n    /// @param salt Arbitrary number to ensure uniqueness of transaction hash.\n    /// @param signerAddress Address of transaction signer.\n    /// @param data AbiV2 encoded calldata.\n    /// @param signature Proof of signer transaction by signer.\n    function executeTransaction(\n        uint256 salt,\n        address signerAddress,\n        bytes data,\n        bytes signature\n    )\n        external\n    {\n        // Prevent reentrancy\n        require(\n            currentContextAddress == address(0),\n            \"REENTRANCY_ILLEGAL\"\n        );\n\n        bytes32 transactionHash = hashEIP712Message(hashZeroExTransaction(\n            salt,\n            signerAddress,\n            data\n        ));\n\n        // Validate transaction has not been executed\n        require(\n            !transactions[transactionHash],\n            \"INVALID_TX_HASH\"\n        );\n\n        // Transaction always valid if signer is sender of transaction\n        if (signerAddress != msg.sender) {\n            // Validate signature\n            require(\n                isValidSignature(\n                    transactionHash,\n                    signerAddress,\n                    signature\n                ),\n                \"INVALID_TX_SIGNATURE\"\n            );\n\n            // Set the current transaction signer\n            currentContextAddress = signerAddress;\n        }\n\n        // Execute transaction\n        transactions[transactionHash] = true;\n        require(\n            address(this).delegatecall(data),\n            \"FAILED_EXECUTION\"\n        );\n\n        // Reset current transaction signer if it was previously updated\n        if (signerAddress != msg.sender) {\n            currentContextAddress = address(0);\n        }\n    }\n\n    /// @dev Calculates EIP712 hash of the Transaction.\n    /// @param salt Arbitrary number to ensure uniqueness of transaction hash.\n    /// @param signerAddress Address of transaction signer.\n    /// @param data AbiV2 encoded calldata.\n    /// @return EIP712 hash of the Transaction.\n    function hashZeroExTransaction(\n        uint256 salt,\n        address signerAddress,\n        bytes memory data\n    )\n        internal\n        pure\n        returns (bytes32 result)\n    {\n        bytes32 schemaHash = EIP712_ZEROEX_TRANSACTION_SCHEMA_HASH;\n        bytes32 dataHash = keccak256(data);\n\n        // Assembly for more efficiently computing:\n        // keccak256(abi.encodePacked(\n        //     EIP712_ZEROEX_TRANSACTION_SCHEMA_HASH,\n        //     salt,\n        //     bytes32(signerAddress),\n        //     keccak256(data)\n        // ));\n\n        assembly {\n            // Load free memory pointer\n            let memPtr := mload(64)\n\n            mstore(memPtr, schemaHash)                                                               // hash of schema\n            mstore(add(memPtr, 32), salt)                                                            // salt\n            mstore(add(memPtr, 64), and(signerAddress, 0xffffffffffffffffffffffffffffffffffffffff))  // signerAddress\n            mstore(add(memPtr, 96), dataHash)                                                        // hash of data\n\n            // Compute hash\n            result := keccak256(memPtr, 128)\n        }\n        return result;\n    }\n\n    /// @dev The current function will be called in the context of this address (either 0x transaction signer or `msg.sender`).\n    ///      If calling a fill function, this address will represent the taker.\n    ///      If calling a cancel function, this address will represent the maker.\n    /// @return Signer of 0x transaction if entry point is `executeTransaction`.\n    ///         `msg.sender` if entry point is any other function.\n    function getCurrentContextAddress()\n        internal\n        view\n        returns (address)\n    {\n        address currentContextAddress_ = currentContextAddress;\n        address contextAddress = currentContextAddress_ == address(0) ? msg.sender : currentContextAddress_;\n        return contextAddress;\n    }\n}\n",
        "protocol/Exchange/MixinWrapperFunctions.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\npragma experimental ABIEncoderV2;\n\nimport \"../../utils/ReentrancyGuard/ReentrancyGuard.sol\";\nimport \"./libs/LibMath.sol\";\nimport \"./libs/LibOrder.sol\";\nimport \"./libs/LibFillResults.sol\";\nimport \"./libs/LibAbiEncoder.sol\";\nimport \"./mixins/MExchangeCore.sol\";\nimport \"./mixins/MWrapperFunctions.sol\";\n\n\ncontract MixinWrapperFunctions is\n    ReentrancyGuard,\n    LibMath,\n    LibFillResults,\n    LibAbiEncoder,\n    MExchangeCore,\n    MWrapperFunctions\n{\n    /// @dev Fills the input order. Reverts if exact takerAssetFillAmount not filled.\n    /// @param order Order struct containing order specifications.\n    /// @param takerAssetFillAmount Desired amount of takerAsset to sell.\n    /// @param signature Proof that order has been created by maker.\n    function fillOrKillOrder(\n        LibOrder.Order memory order,\n        uint256 takerAssetFillAmount,\n        bytes memory signature\n    )\n        public\n        nonReentrant\n        returns (FillResults memory fillResults)\n    {\n        fillResults = fillOrKillOrderInternal(\n            order,\n            takerAssetFillAmount,\n            signature\n        );\n        return fillResults;\n    }\n\n    /// @dev Fills the input order.\n    ///      Returns false if the transaction would otherwise revert.\n    /// @param order Order struct containing order specifications.\n    /// @param takerAssetFillAmount Desired amount of takerAsset to sell.\n    /// @param signature Proof that order has been created by maker.\n    /// @return Amounts filled and fees paid by maker and taker.\n    function fillOrderNoThrow(\n        LibOrder.Order memory order,\n        uint256 takerAssetFillAmount,\n        bytes memory signature\n    )\n        public\n        returns (FillResults memory fillResults)\n    {\n        // ABI encode calldata for `fillOrder`\n        bytes memory fillOrderCalldata = abiEncodeFillOrder(\n            order,\n            takerAssetFillAmount,\n            signature\n        );\n\n        // Delegate to `fillOrder` and handle any exceptions gracefully\n        assembly {\n            let success := delegatecall(\n                gas,                                // forward all gas\n                address,                            // call address of this contract\n                add(fillOrderCalldata, 32),         // pointer to start of input (skip array length in first 32 bytes)\n                mload(fillOrderCalldata),           // length of input\n                fillOrderCalldata,                  // write output over input\n                128                                 // output size is 128 bytes\n            )\n            if success {\n                mstore(fillResults, mload(fillOrderCalldata))\n                mstore(add(fillResults, 32), mload(add(fillOrderCalldata, 32)))\n                mstore(add(fillResults, 64), mload(add(fillOrderCalldata, 64)))\n                mstore(add(fillResults, 96), mload(add(fillOrderCalldata, 96)))\n            }\n        }\n        // fillResults values will be 0 by default if call was unsuccessful\n        return fillResults;\n    }\n\n    /// @dev Synchronously executes multiple calls of fillOrder.\n    /// @param orders Array of order specifications.\n    /// @param takerAssetFillAmounts Array of desired amounts of takerAsset to sell in orders.\n    /// @param signatures Proofs that orders have been created by makers.\n    /// @return Amounts filled and fees paid by makers and taker.\n    ///         NOTE: makerAssetFilledAmount and takerAssetFilledAmount may include amounts filled of different assets.\n    function batchFillOrders(\n        LibOrder.Order[] memory orders,\n        uint256[] memory takerAssetFillAmounts,\n        bytes[] memory signatures\n    )\n        public\n        nonReentrant\n        returns (FillResults memory totalFillResults)\n    {\n        uint256 ordersLength = orders.length;\n        for (uint256 i = 0; i != ordersLength; i++) {\n            FillResults memory singleFillResults = fillOrderInternal(\n                orders[i],\n                takerAssetFillAmounts[i],\n                signatures[i]\n            );\n            addFillResults(totalFillResults, singleFillResults);\n        }\n        return totalFillResults;\n    }\n\n    /// @dev Synchronously executes multiple calls of fillOrKill.\n    /// @param orders Array of order specifications.\n    /// @param takerAssetFillAmounts Array of desired amounts of takerAsset to sell in orders.\n    /// @param signatures Proofs that orders have been created by makers.\n    /// @return Amounts filled and fees paid by makers and taker.\n    ///         NOTE: makerAssetFilledAmount and takerAssetFilledAmount may include amounts filled of different assets.\n    function batchFillOrKillOrders(\n        LibOrder.Order[] memory orders,\n        uint256[] memory takerAssetFillAmounts,\n        bytes[] memory signatures\n    )\n        public\n        nonReentrant\n        returns (FillResults memory totalFillResults)\n    {\n        uint256 ordersLength = orders.length;\n        for (uint256 i = 0; i != ordersLength; i++) {\n            FillResults memory singleFillResults = fillOrKillOrderInternal(\n                orders[i],\n                takerAssetFillAmounts[i],\n                signatures[i]\n            );\n            addFillResults(totalFillResults, singleFillResults);\n        }\n        return totalFillResults;\n    }\n\n    /// @dev Fills an order with specified parameters and ECDSA signature.\n    ///      Returns false if the transaction would otherwise revert.\n    /// @param orders Array of order specifications.\n    /// @param takerAssetFillAmounts Array of desired amounts of takerAsset to sell in orders.\n    /// @param signatures Proofs that orders have been created by makers.\n    /// @return Amounts filled and fees paid by makers and taker.\n    ///         NOTE: makerAssetFilledAmount and takerAssetFilledAmount may include amounts filled of different assets.\n    function batchFillOrdersNoThrow(\n        LibOrder.Order[] memory orders,\n        uint256[] memory takerAssetFillAmounts,\n        bytes[] memory signatures\n    )\n        public\n        returns (FillResults memory totalFillResults)\n    {\n        uint256 ordersLength = orders.length;\n        for (uint256 i = 0; i != ordersLength; i++) {\n            FillResults memory singleFillResults = fillOrderNoThrow(\n                orders[i],\n                takerAssetFillAmounts[i],\n                signatures[i]\n            );\n            addFillResults(totalFillResults, singleFillResults);\n        }\n        return totalFillResults;\n    }\n\n    /// @dev Synchronously executes multiple calls of fillOrder until total amount of takerAsset is sold by taker.\n    /// @param orders Array of order specifications.\n    /// @param takerAssetFillAmount Desired amount of takerAsset to sell.\n    /// @param signatures Proofs that orders have been created by makers.\n    /// @return Amounts filled and fees paid by makers and taker.\n    function marketSellOrders(\n        LibOrder.Order[] memory orders,\n        uint256 takerAssetFillAmount,\n        bytes[] memory signatures\n    )\n        public\n        nonReentrant\n        returns (FillResults memory totalFillResults)\n    {\n        bytes memory takerAssetData = orders[0].takerAssetData;\n    \n        uint256 ordersLength = orders.length;\n        for (uint256 i = 0; i != ordersLength; i++) {\n\n            // We assume that asset being sold by taker is the same for each order.\n            // Rather than passing this in as calldata, we use the takerAssetData from the first order in all later orders.\n            orders[i].takerAssetData = takerAssetData;\n\n            // Calculate the remaining amount of takerAsset to sell\n            uint256 remainingTakerAssetFillAmount = safeSub(takerAssetFillAmount, totalFillResults.takerAssetFilledAmount);\n\n            // Attempt to sell the remaining amount of takerAsset\n            FillResults memory singleFillResults = fillOrderInternal(\n                orders[i],\n                remainingTakerAssetFillAmount,\n                signatures[i]\n            );\n\n            // Update amounts filled and fees paid by maker and taker\n            addFillResults(totalFillResults, singleFillResults);\n\n            // Stop execution if the entire amount of takerAsset has been sold\n            if (totalFillResults.takerAssetFilledAmount >= takerAssetFillAmount) {\n                break;\n            }\n        }\n        return totalFillResults;\n    }\n\n    /// @dev Synchronously executes multiple calls of fillOrder until total amount of takerAsset is sold by taker.\n    ///      Returns false if the transaction would otherwise revert.\n    /// @param orders Array of order specifications.\n    /// @param takerAssetFillAmount Desired amount of takerAsset to sell.\n    /// @param signatures Proofs that orders have been signed by makers.\n    /// @return Amounts filled and fees paid by makers and taker.\n    function marketSellOrdersNoThrow(\n        LibOrder.Order[] memory orders,\n        uint256 takerAssetFillAmount,\n        bytes[] memory signatures\n    )\n        public\n        returns (FillResults memory totalFillResults)\n    {\n        bytes memory takerAssetData = orders[0].takerAssetData;\n\n        uint256 ordersLength = orders.length;\n        for (uint256 i = 0; i != ordersLength; i++) {\n\n            // We assume that asset being sold by taker is the same for each order.\n            // Rather than passing this in as calldata, we use the takerAssetData from the first order in all later orders.\n            orders[i].takerAssetData = takerAssetData;\n\n            // Calculate the remaining amount of takerAsset to sell\n            uint256 remainingTakerAssetFillAmount = safeSub(takerAssetFillAmount, totalFillResults.takerAssetFilledAmount);\n\n            // Attempt to sell the remaining amount of takerAsset\n            FillResults memory singleFillResults = fillOrderNoThrow(\n                orders[i],\n                remainingTakerAssetFillAmount,\n                signatures[i]\n            );\n\n            // Update amounts filled and fees paid by maker and taker\n            addFillResults(totalFillResults, singleFillResults);\n\n            // Stop execution if the entire amount of takerAsset has been sold\n            if (totalFillResults.takerAssetFilledAmount >= takerAssetFillAmount) {\n                break;\n            }\n        }\n        return totalFillResults;\n    }\n\n    /// @dev Synchronously executes multiple calls of fillOrder until total amount of makerAsset is bought by taker.\n    /// @param orders Array of order specifications.\n    /// @param makerAssetFillAmount Desired amount of makerAsset to buy.\n    /// @param signatures Proofs that orders have been signed by makers.\n    /// @return Amounts filled and fees paid by makers and taker.\n    function marketBuyOrders(\n        LibOrder.Order[] memory orders,\n        uint256 makerAssetFillAmount,\n        bytes[] memory signatures\n    )\n        public\n        nonReentrant\n        returns (FillResults memory totalFillResults)\n    {\n        bytes memory makerAssetData = orders[0].makerAssetData;\n\n        uint256 ordersLength = orders.length;\n        for (uint256 i = 0; i != ordersLength; i++) {\n\n            // We assume that asset being bought by taker is the same for each order.\n            // Rather than passing this in as calldata, we copy the makerAssetData from the first order onto all later orders.\n            orders[i].makerAssetData = makerAssetData;\n\n            // Calculate the remaining amount of makerAsset to buy\n            uint256 remainingMakerAssetFillAmount = safeSub(makerAssetFillAmount, totalFillResults.makerAssetFilledAmount);\n\n            // Convert the remaining amount of makerAsset to buy into remaining amount\n            // of takerAsset to sell, assuming entire amount can be sold in the current order\n            uint256 remainingTakerAssetFillAmount = getPartialAmountFloor(\n                orders[i].takerAssetAmount,\n                orders[i].makerAssetAmount,\n                remainingMakerAssetFillAmount\n            );\n\n            // Attempt to sell the remaining amount of takerAsset\n            FillResults memory singleFillResults = fillOrderInternal(\n                orders[i],\n                remainingTakerAssetFillAmount,\n                signatures[i]\n            );\n\n            // Update amounts filled and fees paid by maker and taker\n            addFillResults(totalFillResults, singleFillResults);\n\n            // Stop execution if the entire amount of makerAsset has been bought\n            if (totalFillResults.makerAssetFilledAmount >= makerAssetFillAmount) {\n                break;\n            }\n        }\n        return totalFillResults;\n    }\n\n    /// @dev Synchronously executes multiple fill orders in a single transaction until total amount is bought by taker.\n    ///      Returns false if the transaction would otherwise revert.\n    /// @param orders Array of order specifications.\n    /// @param makerAssetFillAmount Desired amount of makerAsset to buy.\n    /// @param signatures Proofs that orders have been signed by makers.\n    /// @return Amounts filled and fees paid by makers and taker.\n    function marketBuyOrdersNoThrow(\n        LibOrder.Order[] memory orders,\n        uint256 makerAssetFillAmount,\n        bytes[] memory signatures\n    )\n        public\n        returns (FillResults memory totalFillResults)\n    {\n        bytes memory makerAssetData = orders[0].makerAssetData;\n\n        uint256 ordersLength = orders.length;\n        for (uint256 i = 0; i != ordersLength; i++) {\n\n            // We assume that asset being bought by taker is the same for each order.\n            // Rather than passing this in as calldata, we copy the makerAssetData from the first order onto all later orders.\n            orders[i].makerAssetData = makerAssetData;\n\n            // Calculate the remaining amount of makerAsset to buy\n            uint256 remainingMakerAssetFillAmount = safeSub(makerAssetFillAmount, totalFillResults.makerAssetFilledAmount);\n\n            // Convert the remaining amount of makerAsset to buy into remaining amount\n            // of takerAsset to sell, assuming entire amount can be sold in the current order\n            uint256 remainingTakerAssetFillAmount = getPartialAmountFloor(\n                orders[i].takerAssetAmount,\n                orders[i].makerAssetAmount,\n                remainingMakerAssetFillAmount\n            );\n\n            // Attempt to sell the remaining amount of takerAsset\n            FillResults memory singleFillResults = fillOrderNoThrow(\n                orders[i],\n                remainingTakerAssetFillAmount,\n                signatures[i]\n            );\n\n            // Update amounts filled and fees paid by maker and taker\n            addFillResults(totalFillResults, singleFillResults);\n\n            // Stop execution if the entire amount of makerAsset has been bought\n            if (totalFillResults.makerAssetFilledAmount >= makerAssetFillAmount) {\n                break;\n            }\n        }\n        return totalFillResults;\n    }\n\n    /// @dev Synchronously cancels multiple orders in a single transaction.\n    /// @param orders Array of order specifications.\n    function batchCancelOrders(LibOrder.Order[] memory orders)\n        public\n        nonReentrant\n    {\n        uint256 ordersLength = orders.length;\n        for (uint256 i = 0; i != ordersLength; i++) {\n            cancelOrderInternal(orders[i]);\n        }\n    }\n\n    /// @dev Fetches information for all passed in orders.\n    /// @param orders Array of order specifications.\n    /// @return Array of OrderInfo instances that correspond to each order.\n    function getOrdersInfo(LibOrder.Order[] memory orders)\n        public\n        view\n        returns (LibOrder.OrderInfo[] memory)\n    {\n        uint256 ordersLength = orders.length;\n        LibOrder.OrderInfo[] memory ordersInfo = new LibOrder.OrderInfo[](ordersLength);\n        for (uint256 i = 0; i != ordersLength; i++) {\n            ordersInfo[i] = getOrderInfo(orders[i]);\n        }\n        return ordersInfo;\n    }\n\n    /// @dev Fills the input order. Reverts if exact takerAssetFillAmount not filled.\n    /// @param order Order struct containing order specifications.\n    /// @param takerAssetFillAmount Desired amount of takerAsset to sell.\n    /// @param signature Proof that order has been created by maker.\n    function fillOrKillOrderInternal(\n        LibOrder.Order memory order,\n        uint256 takerAssetFillAmount,\n        bytes memory signature\n    )\n        internal\n        returns (FillResults memory fillResults)\n    {\n        fillResults = fillOrderInternal(\n            order,\n            takerAssetFillAmount,\n            signature\n        );\n        require(\n            fillResults.takerAssetFilledAmount == takerAssetFillAmount,\n            \"COMPLETE_FILL_FAILED\"\n        );\n        return fillResults;\n    }\n}\n",
        "protocol/Exchange/interfaces/IAssetProxyDispatcher.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\n\ncontract IAssetProxyDispatcher {\n\n    /// @dev Registers an asset proxy to its asset proxy id.\n    ///      Once an asset proxy is registered, it cannot be unregistered.\n    /// @param assetProxy Address of new asset proxy to register.\n    function registerAssetProxy(address assetProxy)\n        external;\n\n    /// @dev Gets an asset proxy.\n    /// @param assetProxyId Id of the asset proxy.\n    /// @return The asset proxy registered to assetProxyId. Returns 0x0 if no proxy is registered.\n    function getAssetProxy(bytes4 assetProxyId)\n        external\n        view\n        returns (address);\n}\n",
        "protocol/Exchange/interfaces/IExchange.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\npragma experimental ABIEncoderV2;\n\nimport \"./IExchangeCore.sol\";\nimport \"./IMatchOrders.sol\";\nimport \"./ISignatureValidator.sol\";\nimport \"./ITransactions.sol\";\nimport \"./IAssetProxyDispatcher.sol\";\nimport \"./IWrapperFunctions.sol\";\n\n\n// solhint-disable no-empty-blocks\ncontract IExchange is\n    IExchangeCore,\n    IMatchOrders,\n    ISignatureValidator,\n    ITransactions,\n    IAssetProxyDispatcher,\n    IWrapperFunctions\n{}\n",
        "protocol/Exchange/interfaces/IExchangeCore.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\npragma experimental ABIEncoderV2;\n\nimport \"../libs/LibOrder.sol\";\nimport \"../libs/LibFillResults.sol\";\n\n\ncontract IExchangeCore {\n\n    /// @dev Cancels all orders created by makerAddress with a salt less than or equal to the targetOrderEpoch\n    ///      and senderAddress equal to msg.sender (or null address if msg.sender == makerAddress).\n    /// @param targetOrderEpoch Orders created with a salt less or equal to this value will be cancelled.\n    function cancelOrdersUpTo(uint256 targetOrderEpoch)\n        external;\n\n    /// @dev Fills the input order.\n    /// @param order Order struct containing order specifications.\n    /// @param takerAssetFillAmount Desired amount of takerAsset to sell.\n    /// @param signature Proof that order has been created by maker.\n    /// @return Amounts filled and fees paid by maker and taker.\n    function fillOrder(\n        LibOrder.Order memory order,\n        uint256 takerAssetFillAmount,\n        bytes memory signature\n    )\n        public\n        returns (LibFillResults.FillResults memory fillResults);\n\n    /// @dev After calling, the order can not be filled anymore.\n    /// @param order Order struct containing order specifications.\n    function cancelOrder(LibOrder.Order memory order)\n        public;\n\n    /// @dev Gets information about an order: status, hash, and amount filled.\n    /// @param order Order to gather information on.\n    /// @return OrderInfo Information about the order and its state.\n    ///                   See LibOrder.OrderInfo for a complete description.\n    function getOrderInfo(LibOrder.Order memory order)\n        public\n        view\n        returns (LibOrder.OrderInfo memory orderInfo);\n}\n",
        "protocol/Exchange/interfaces/IMatchOrders.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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*/\npragma solidity 0.4.24;\npragma experimental ABIEncoderV2;\n\nimport \"../libs/LibOrder.sol\";\nimport \"../libs/LibFillResults.sol\";\n\n\ncontract IMatchOrders {\n\n    /// @dev Match two complementary orders that have a profitable spread.\n    ///      Each order is filled at their respective price point. However, the calculations are\n    ///      carried out as though the orders are both being filled at the right order's price point.\n    ///      The profit made by the left order goes to the taker (who matched the two orders).\n    /// @param leftOrder First order to match.\n    /// @param rightOrder Second order to match.\n    /// @param leftSignature Proof that order was created by the left maker.\n    /// @param rightSignature Proof that order was created by the right maker.\n    /// @return matchedFillResults Amounts filled and fees paid by maker and taker of matched orders.\n    function matchOrders(\n        LibOrder.Order memory leftOrder,\n        LibOrder.Order memory rightOrder,\n        bytes memory leftSignature,\n        bytes memory rightSignature\n    )\n        public\n        returns (LibFillResults.MatchedFillResults memory matchedFillResults);\n}\n",
        "protocol/Exchange/interfaces/ISignatureValidator.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\n\ncontract ISignatureValidator {\n\n    /// @dev Approves a hash on-chain using any valid signature type.\n    ///      After presigning a hash, the preSign signature type will become valid for that hash and signer.\n    /// @param signerAddress Address that should have signed the given hash.\n    /// @param signature Proof that the hash has been signed by signer.\n    function preSign(\n        bytes32 hash,\n        address signerAddress,\n        bytes signature\n    )\n        external;\n    \n    /// @dev Approves/unnapproves a Validator contract to verify signatures on signer's behalf.\n    /// @param validatorAddress Address of Validator contract.\n    /// @param approval Approval or disapproval of  Validator contract.\n    function setSignatureValidatorApproval(\n        address validatorAddress,\n        bool approval\n    )\n        external;\n\n    /// @dev Verifies that a signature is valid.\n    /// @param hash Message hash that is signed.\n    /// @param signerAddress Address of signer.\n    /// @param signature Proof of signing.\n    /// @return Validity of order signature.\n    function isValidSignature(\n        bytes32 hash,\n        address signerAddress,\n        bytes memory signature\n    )\n        public\n        view\n        returns (bool isValid);\n}\n",
        "protocol/Exchange/interfaces/ITransactions.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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*/\npragma solidity 0.4.24;\n\n\ncontract ITransactions {\n\n    /// @dev Executes an exchange method call in the context of signer.\n    /// @param salt Arbitrary number to ensure uniqueness of transaction hash.\n    /// @param signerAddress Address of transaction signer.\n    /// @param data AbiV2 encoded calldata.\n    /// @param signature Proof of signer transaction by signer.\n    function executeTransaction(\n        uint256 salt,\n        address signerAddress,\n        bytes data,\n        bytes signature\n    )\n        external;\n}\n",
        "protocol/Exchange/interfaces/IValidator.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\n\ncontract IValidator {\n\n    /// @dev Verifies that a signature is valid.\n    /// @param hash Message hash that is signed.\n    /// @param signerAddress Address that should have signed the given hash.\n    /// @param signature Proof of signing.\n    /// @return Validity of order signature.\n    function isValidSignature(\n        bytes32 hash,\n        address signerAddress,\n        bytes signature\n    )\n        external\n        view\n        returns (bool isValid);\n}\n",
        "protocol/Exchange/interfaces/IWallet.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\n\ncontract IWallet {\n\n    /// @dev Verifies that a signature is valid.\n    /// @param hash Message hash that is signed.\n    /// @param signature Proof of signing.\n    /// @return Validity of order signature.\n    function isValidSignature(\n        bytes32 hash,\n        bytes signature\n    )\n        external\n        view\n        returns (bool isValid);\n}\n",
        "protocol/Exchange/interfaces/IWrapperFunctions.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\npragma experimental ABIEncoderV2;\n\nimport \"../libs/LibOrder.sol\";\nimport \"../libs/LibFillResults.sol\";\n\n\ncontract IWrapperFunctions {\n\n    /// @dev Fills the input order. Reverts if exact takerAssetFillAmount not filled.\n    /// @param order LibOrder.Order struct containing order specifications.\n    /// @param takerAssetFillAmount Desired amount of takerAsset to sell.\n    /// @param signature Proof that order has been created by maker.\n    function fillOrKillOrder(\n        LibOrder.Order memory order,\n        uint256 takerAssetFillAmount,\n        bytes memory signature\n    )\n        public\n        returns (LibFillResults.FillResults memory fillResults);\n\n    /// @dev Fills an order with specified parameters and ECDSA signature.\n    ///      Returns false if the transaction would otherwise revert.\n    /// @param order LibOrder.Order struct containing order specifications.\n    /// @param takerAssetFillAmount Desired amount of takerAsset to sell.\n    /// @param signature Proof that order has been created by maker.\n    /// @return Amounts filled and fees paid by maker and taker.\n    function fillOrderNoThrow(\n        LibOrder.Order memory order,\n        uint256 takerAssetFillAmount,\n        bytes memory signature\n    )\n        public\n        returns (LibFillResults.FillResults memory fillResults);\n\n    /// @dev Synchronously executes multiple calls of fillOrder.\n    /// @param orders Array of order specifications.\n    /// @param takerAssetFillAmounts Array of desired amounts of takerAsset to sell in orders.\n    /// @param signatures Proofs that orders have been created by makers.\n    /// @return Amounts filled and fees paid by makers and taker.\n    function batchFillOrders(\n        LibOrder.Order[] memory orders,\n        uint256[] memory takerAssetFillAmounts,\n        bytes[] memory signatures\n    )\n        public\n        returns (LibFillResults.FillResults memory totalFillResults);\n\n    /// @dev Synchronously executes multiple calls of fillOrKill.\n    /// @param orders Array of order specifications.\n    /// @param takerAssetFillAmounts Array of desired amounts of takerAsset to sell in orders.\n    /// @param signatures Proofs that orders have been created by makers.\n    /// @return Amounts filled and fees paid by makers and taker.\n    function batchFillOrKillOrders(\n        LibOrder.Order[] memory orders,\n        uint256[] memory takerAssetFillAmounts,\n        bytes[] memory signatures\n    )\n        public\n        returns (LibFillResults.FillResults memory totalFillResults);\n\n    /// @dev Fills an order with specified parameters and ECDSA signature.\n    ///      Returns false if the transaction would otherwise revert.\n    /// @param orders Array of order specifications.\n    /// @param takerAssetFillAmounts Array of desired amounts of takerAsset to sell in orders.\n    /// @param signatures Proofs that orders have been created by makers.\n    /// @return Amounts filled and fees paid by makers and taker.\n    function batchFillOrdersNoThrow(\n        LibOrder.Order[] memory orders,\n        uint256[] memory takerAssetFillAmounts,\n        bytes[] memory signatures\n    )\n        public\n        returns (LibFillResults.FillResults memory totalFillResults);\n\n    /// @dev Synchronously executes multiple calls of fillOrder until total amount of takerAsset is sold by taker.\n    /// @param orders Array of order specifications.\n    /// @param takerAssetFillAmount Desired amount of takerAsset to sell.\n    /// @param signatures Proofs that orders have been created by makers.\n    /// @return Amounts filled and fees paid by makers and taker.\n    function marketSellOrders(\n        LibOrder.Order[] memory orders,\n        uint256 takerAssetFillAmount,\n        bytes[] memory signatures\n    )\n        public\n        returns (LibFillResults.FillResults memory totalFillResults);\n\n    /// @dev Synchronously executes multiple calls of fillOrder until total amount of takerAsset is sold by taker.\n    ///      Returns false if the transaction would otherwise revert.\n    /// @param orders Array of order specifications.\n    /// @param takerAssetFillAmount Desired amount of takerAsset to sell.\n    /// @param signatures Proofs that orders have been signed by makers.\n    /// @return Amounts filled and fees paid by makers and taker.\n    function marketSellOrdersNoThrow(\n        LibOrder.Order[] memory orders,\n        uint256 takerAssetFillAmount,\n        bytes[] memory signatures\n    )\n        public\n        returns (LibFillResults.FillResults memory totalFillResults);\n\n    /// @dev Synchronously executes multiple calls of fillOrder until total amount of makerAsset is bought by taker.\n    /// @param orders Array of order specifications.\n    /// @param makerAssetFillAmount Desired amount of makerAsset to buy.\n    /// @param signatures Proofs that orders have been signed by makers.\n    /// @return Amounts filled and fees paid by makers and taker.\n    function marketBuyOrders(\n        LibOrder.Order[] memory orders,\n        uint256 makerAssetFillAmount,\n        bytes[] memory signatures\n    )\n        public\n        returns (LibFillResults.FillResults memory totalFillResults);\n\n    /// @dev Synchronously executes multiple fill orders in a single transaction until total amount is bought by taker.\n    ///      Returns false if the transaction would otherwise revert.\n    /// @param orders Array of order specifications.\n    /// @param makerAssetFillAmount Desired amount of makerAsset to buy.\n    /// @param signatures Proofs that orders have been signed by makers.\n    /// @return Amounts filled and fees paid by makers and taker.\n    function marketBuyOrdersNoThrow(\n        LibOrder.Order[] memory orders,\n        uint256 makerAssetFillAmount,\n        bytes[] memory signatures\n    )\n        public\n        returns (LibFillResults.FillResults memory totalFillResults);\n\n    /// @dev Synchronously cancels multiple orders in a single transaction.\n    /// @param orders Array of order specifications.\n    function batchCancelOrders(LibOrder.Order[] memory orders)\n        public;\n\n    /// @dev Fetches information for all passed in orders\n    /// @param orders Array of order specifications.\n    /// @return Array of OrderInfo instances that correspond to each order.\n    function getOrdersInfo(LibOrder.Order[] memory orders)\n        public\n        view\n        returns (LibOrder.OrderInfo[] memory);\n}\n",
        "protocol/Exchange/libs/LibAbiEncoder.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\npragma experimental ABIEncoderV2;\n\nimport \"./LibOrder.sol\";\n\n\ncontract LibAbiEncoder {\n\n    /// @dev ABI encodes calldata for `fillOrder`.\n    /// @param order Order struct containing order specifications.\n    /// @param takerAssetFillAmount Desired amount of takerAsset to sell.\n    /// @param signature Proof that order has been created by maker.\n    /// @return ABI encoded calldata for `fillOrder`.\n    function abiEncodeFillOrder(\n        LibOrder.Order memory order,\n        uint256 takerAssetFillAmount,\n        bytes memory signature\n    )\n        internal\n        pure\n        returns (bytes memory fillOrderCalldata)\n    {\n        // We need to call MExchangeCore.fillOrder using a delegatecall in\n        // assembly so that we can intercept a call that throws. For this, we\n        // need the input encoded in memory in the Ethereum ABIv2 format [1].\n\n        // | Area     | Offset | Length  | Contents                                    |\n        // | -------- |--------|---------|-------------------------------------------- |\n        // | Header   | 0x00   | 4       | function selector                           |\n        // | Params   |        | 3 * 32  | function parameters:                        |\n        // |          | 0x00   |         |   1. offset to order (*)                    |\n        // |          | 0x20   |         |   2. takerAssetFillAmount                   |\n        // |          | 0x40   |         |   3. offset to signature (*)                |\n        // | Data     |        | 12 * 32 | order:                                      |\n        // |          | 0x000  |         |   1.  senderAddress                         |\n        // |          | 0x020  |         |   2.  makerAddress                          |\n        // |          | 0x040  |         |   3.  takerAddress                          |\n        // |          | 0x060  |         |   4.  feeRecipientAddress                   |\n        // |          | 0x080  |         |   5.  makerAssetAmount                      |\n        // |          | 0x0A0  |         |   6.  takerAssetAmount                      |\n        // |          | 0x0C0  |         |   7.  makerFeeAmount                        |\n        // |          | 0x0E0  |         |   8.  takerFeeAmount                        |\n        // |          | 0x100  |         |   9.  expirationTimeSeconds                 |\n        // |          | 0x120  |         |   10. salt                                  |\n        // |          | 0x140  |         |   11. Offset to makerAssetData (*)          |\n        // |          | 0x160  |         |   12. Offset to takerAssetData (*)          |\n        // |          | 0x180  | 32      | makerAssetData Length                       |\n        // |          | 0x1A0  | **      | makerAssetData Contents                     |\n        // |          | 0x1C0  | 32      | takerAssetData Length                       |\n        // |          | 0x1E0  | **      | takerAssetData Contents                     |\n        // |          | 0x200  | 32      | signature Length                            |\n        // |          | 0x220  | **      | signature Contents                          |\n\n        // * Offsets are calculated from the beginning of the current area: Header, Params, Data:\n        //     An offset stored in the Params area is calculated from the beginning of the Params section.\n        //     An offset stored in the Data area is calculated from the beginning of the Data section.\n\n        // ** The length of dynamic array contents are stored in the field immediately preceeding the contents.\n\n        // [1]: https://solidity.readthedocs.io/en/develop/abi-spec.html\n\n        assembly {\n\n            // Areas below may use the following variables:\n            //   1. <area>Start   -- Start of this area in memory\n            //   2. <area>End     -- End of this area in memory. This value may\n            //                       be precomputed (before writing contents),\n            //                       or it may be computed as contents are written.\n            //   3. <area>Offset  -- Current offset into area. If an area's End\n            //                       is precomputed, this variable tracks the\n            //                       offsets of contents as they are written.\n\n            /////// Setup Header Area ///////\n            // Load free memory pointer\n            fillOrderCalldata := mload(0x40)\n            // bytes4(keccak256(\"fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)\"))\n            // = 0xb4be83d5\n            // Leave 0x20 bytes to store the length\n            mstore(add(fillOrderCalldata, 0x20), 0xb4be83d500000000000000000000000000000000000000000000000000000000)\n            let headerAreaEnd := add(fillOrderCalldata, 0x24)\n\n            /////// Setup Params Area ///////\n            // This area is preallocated and written to later.\n            // This is because we need to fill in offsets that have not yet been calculated.\n            let paramsAreaStart := headerAreaEnd\n            let paramsAreaEnd := add(paramsAreaStart, 0x60)\n            let paramsAreaOffset := paramsAreaStart\n\n            /////// Setup Data Area ///////\n            let dataAreaStart := paramsAreaEnd\n            let dataAreaEnd := dataAreaStart\n\n            // Offset from the source data we're reading from\n            let sourceOffset := order\n            // arrayLenBytes and arrayLenWords track the length of a dynamically-allocated bytes array.\n            let arrayLenBytes := 0\n            let arrayLenWords := 0\n\n            /////// Write order Struct ///////\n            // Write memory location of Order, relative to the start of the\n            // parameter list, then increment the paramsAreaOffset respectively.\n            mstore(paramsAreaOffset, sub(dataAreaEnd, paramsAreaStart))\n            paramsAreaOffset := add(paramsAreaOffset, 0x20)\n\n            // Write values for each field in the order\n            // It would be nice to use a loop, but we save on gas by writing\n            // the stores sequentially.\n            mstore(dataAreaEnd, mload(sourceOffset))                            // makerAddress\n            mstore(add(dataAreaEnd, 0x20), mload(add(sourceOffset, 0x20)))      // takerAddress\n            mstore(add(dataAreaEnd, 0x40), mload(add(sourceOffset, 0x40)))      // feeRecipientAddress\n            mstore(add(dataAreaEnd, 0x60), mload(add(sourceOffset, 0x60)))      // senderAddress\n            mstore(add(dataAreaEnd, 0x80), mload(add(sourceOffset, 0x80)))      // makerAssetAmount\n            mstore(add(dataAreaEnd, 0xA0), mload(add(sourceOffset, 0xA0)))      // takerAssetAmount\n            mstore(add(dataAreaEnd, 0xC0), mload(add(sourceOffset, 0xC0)))      // makerFeeAmount\n            mstore(add(dataAreaEnd, 0xE0), mload(add(sourceOffset, 0xE0)))      // takerFeeAmount\n            mstore(add(dataAreaEnd, 0x100), mload(add(sourceOffset, 0x100)))    // expirationTimeSeconds\n            mstore(add(dataAreaEnd, 0x120), mload(add(sourceOffset, 0x120)))    // salt\n            mstore(add(dataAreaEnd, 0x140), mload(add(sourceOffset, 0x140)))    // Offset to makerAssetData\n            mstore(add(dataAreaEnd, 0x160), mload(add(sourceOffset, 0x160)))    // Offset to takerAssetData\n            dataAreaEnd := add(dataAreaEnd, 0x180)\n            sourceOffset := add(sourceOffset, 0x180)\n\n            // Write offset to <order.makerAssetData>\n            mstore(add(dataAreaStart, mul(10, 0x20)), sub(dataAreaEnd, dataAreaStart))\n\n            // Calculate length of <order.makerAssetData>\n            sourceOffset := mload(add(order, 0x140)) // makerAssetData\n            arrayLenBytes := mload(sourceOffset)\n            sourceOffset := add(sourceOffset, 0x20)\n            arrayLenWords := div(add(arrayLenBytes, 0x1F), 0x20)\n\n            // Write length of <order.makerAssetData>\n            mstore(dataAreaEnd, arrayLenBytes)\n            dataAreaEnd := add(dataAreaEnd, 0x20)\n\n            // Write contents of <order.makerAssetData>\n            for {let i := 0} lt(i, arrayLenWords) {i := add(i, 1)} {\n                mstore(dataAreaEnd, mload(sourceOffset))\n                dataAreaEnd := add(dataAreaEnd, 0x20)\n                sourceOffset := add(sourceOffset, 0x20)\n            }\n\n            // Write offset to <order.takerAssetData>\n            mstore(add(dataAreaStart, mul(11, 0x20)), sub(dataAreaEnd, dataAreaStart))\n\n            // Calculate length of <order.takerAssetData>\n            sourceOffset := mload(add(order, 0x160)) // takerAssetData\n            arrayLenBytes := mload(sourceOffset)\n            sourceOffset := add(sourceOffset, 0x20)\n            arrayLenWords := div(add(arrayLenBytes, 0x1F), 0x20)\n\n            // Write length of <order.takerAssetData>\n            mstore(dataAreaEnd, arrayLenBytes)\n            dataAreaEnd := add(dataAreaEnd, 0x20)\n\n            // Write contents of  <order.takerAssetData>\n            for {let i := 0} lt(i, arrayLenWords) {i := add(i, 1)} {\n                mstore(dataAreaEnd, mload(sourceOffset))\n                dataAreaEnd := add(dataAreaEnd, 0x20)\n                sourceOffset := add(sourceOffset, 0x20)\n            }\n\n            /////// Write takerAssetFillAmount ///////\n            mstore(paramsAreaOffset, takerAssetFillAmount)\n            paramsAreaOffset := add(paramsAreaOffset, 0x20)\n\n            /////// Write signature ///////\n            // Write offset to paramsArea\n            mstore(paramsAreaOffset, sub(dataAreaEnd, paramsAreaStart))\n\n            // Calculate length of signature\n            sourceOffset := signature\n            arrayLenBytes := mload(sourceOffset)\n            sourceOffset := add(sourceOffset, 0x20)\n            arrayLenWords := div(add(arrayLenBytes, 0x1F), 0x20)\n\n            // Write length of signature\n            mstore(dataAreaEnd, arrayLenBytes)\n            dataAreaEnd := add(dataAreaEnd, 0x20)\n\n            // Write contents of signature\n            for {let i := 0} lt(i, arrayLenWords) {i := add(i, 1)} {\n                mstore(dataAreaEnd, mload(sourceOffset))\n                dataAreaEnd := add(dataAreaEnd, 0x20)\n                sourceOffset := add(sourceOffset, 0x20)\n            }\n\n            // Set length of calldata\n            mstore(fillOrderCalldata, sub(dataAreaEnd, add(fillOrderCalldata, 0x20)))\n\n            // Increment free memory pointer\n            mstore(0x40, dataAreaEnd)\n        }\n\n        return fillOrderCalldata;\n    }\n}\n",
        "protocol/Exchange/libs/LibConstants.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\n\n// solhint-disable max-line-length\ncontract LibConstants {\n   \n    // Asset data for ZRX token. Used for fee transfers.\n    // @TODO: Hardcode constant when we deploy. Currently \n    //        not constant to make testing easier.\n\n    // The proxyId for ZRX_ASSET_DATA is bytes4(keccak256(\"ERC20Token(address)\")) = 0xf47261b0\n    \n    // Kovan ZRX address is 0x6ff6c0ff1d68b964901f986d4c9fa3ac68346570.\n    // The ABI encoded proxyId and address is 0xf47261b00000000000000000000000006ff6c0ff1d68b964901f986d4c9fa3ac68346570\n    // bytes constant public ZRX_ASSET_DATA = \"\\xf4\\x72\\x61\\xb0\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x6f\\xf6\\xc0\\xff\\x1d\\x68\\xb9\\x64\\x90\\x1f\\x98\\x6d\\x4c\\x9f\\xa3\\xac\\x68\\x34\\x65\\x70\";\n    \n    // Mainnet ZRX address is 0xe41d2489571d322189246dafa5ebde1f4699f498.\n    // The ABI encoded proxyId and address is 0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498\n    // bytes constant public ZRX_ASSET_DATA = \"\\xf4\\x72\\x61\\xb0\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\xe4\\x1d\\x24\\x89\\x57\\x1d\\x32\\x21\\x89\\x24\\x6d\\xaf\\xa5\\xeb\\xde\\x1f\\x46\\x99\\xf4\\x98\";\n    \n    // solhint-disable-next-line var-name-mixedcase\n    bytes public ZRX_ASSET_DATA;\n\n    // @TODO: Remove when we deploy.\n    constructor (bytes memory zrxAssetData)\n        public\n    {\n        ZRX_ASSET_DATA = zrxAssetData;\n    }\n}\n// solhint-enable max-line-length\n",
        "protocol/Exchange/libs/LibEIP712.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\n\ncontract LibEIP712 {\n\n    // EIP191 header for EIP712 prefix\n    string constant internal EIP191_HEADER = \"\\x19\\x01\";\n\n    // EIP712 Domain Name value\n    string constant internal EIP712_DOMAIN_NAME = \"0x Protocol\";\n\n    // EIP712 Domain Version value\n    string constant internal EIP712_DOMAIN_VERSION = \"2\";\n\n    // Hash of the EIP712 Domain Separator Schema\n    bytes32 constant internal EIP712_DOMAIN_SEPARATOR_SCHEMA_HASH = keccak256(abi.encodePacked(\n        \"EIP712Domain(\",\n        \"string name,\",\n        \"string version,\",\n        \"address verifyingContract\",\n        \")\"\n    ));\n\n    // Hash of the EIP712 Domain Separator data\n    // solhint-disable-next-line var-name-mixedcase\n    bytes32 public EIP712_DOMAIN_HASH;\n\n    constructor ()\n        public\n    {\n        EIP712_DOMAIN_HASH = keccak256(abi.encodePacked(\n            EIP712_DOMAIN_SEPARATOR_SCHEMA_HASH,\n            keccak256(bytes(EIP712_DOMAIN_NAME)),\n            keccak256(bytes(EIP712_DOMAIN_VERSION)),\n            bytes32(address(this))\n        ));\n    }\n\n    /// @dev Calculates EIP712 encoding for a hash struct in this EIP712 Domain.\n    /// @param hashStruct The EIP712 hash struct.\n    /// @return EIP712 hash applied to this EIP712 Domain.\n    function hashEIP712Message(bytes32 hashStruct)\n        internal\n        view\n        returns (bytes32 result)\n    {\n        bytes32 eip712DomainHash = EIP712_DOMAIN_HASH;\n\n        // Assembly for more efficient computing:\n        // keccak256(abi.encodePacked(\n        //     EIP191_HEADER,\n        //     EIP712_DOMAIN_HASH,\n        //     hashStruct    \n        // ));\n\n        assembly {\n            // Load free memory pointer\n            let memPtr := mload(64)\n\n            mstore(memPtr, 0x1901000000000000000000000000000000000000000000000000000000000000)  // EIP191 header\n            mstore(add(memPtr, 2), eip712DomainHash)                                            // EIP712 domain hash\n            mstore(add(memPtr, 34), hashStruct)                                                 // Hash of struct\n\n            // Compute hash\n            result := keccak256(memPtr, 66)\n        }\n        return result;\n    }\n}\n",
        "protocol/Exchange/libs/LibExchangeErrors.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\n// solhint-disable\npragma solidity 0.4.24;\n\n\n/// @dev This contract documents the revert reasons used in the Exchange contract.\n/// This contract is intended to serve as a reference, but is not actually used for efficiency reasons.\ncontract LibExchangeErrors {\n\n    /// Order validation errors ///\n    string constant ORDER_UNFILLABLE = \"ORDER_UNFILLABLE\";                              // Order cannot be filled.\n    string constant INVALID_MAKER = \"INVALID_MAKER\";                                    // Invalid makerAddress.\n    string constant INVALID_TAKER = \"INVALID_TAKER\";                                    // Invalid takerAddress.\n    string constant INVALID_SENDER = \"INVALID_SENDER\";                                  // Invalid `msg.sender`.\n    string constant INVALID_ORDER_SIGNATURE = \"INVALID_ORDER_SIGNATURE\";                // Signature validation failed. \n    \n    /// fillOrder validation errors ///\n    string constant INVALID_TAKER_AMOUNT = \"INVALID_TAKER_AMOUNT\";                      // takerAssetFillAmount cannot equal 0.\n    string constant ROUNDING_ERROR = \"ROUNDING_ERROR\";                                  // Rounding error greater than 0.1% of takerAssetFillAmount. \n    \n    /// Signature validation errors ///\n    string constant INVALID_SIGNATURE = \"INVALID_SIGNATURE\";                            // Signature validation failed. \n    string constant SIGNATURE_ILLEGAL = \"SIGNATURE_ILLEGAL\";                            // Signature type is illegal.\n    string constant SIGNATURE_UNSUPPORTED = \"SIGNATURE_UNSUPPORTED\";                    // Signature type unsupported.\n    \n    /// cancelOrdersUptTo errors ///\n    string constant INVALID_NEW_ORDER_EPOCH = \"INVALID_NEW_ORDER_EPOCH\";                // Specified salt must be greater than or equal to existing orderEpoch.\n\n    /// fillOrKillOrder errors ///\n    string constant COMPLETE_FILL_FAILED = \"COMPLETE_FILL_FAILED\";                      // Desired takerAssetFillAmount could not be completely filled. \n\n    /// matchOrders errors ///\n    string constant NEGATIVE_SPREAD_REQUIRED = \"NEGATIVE_SPREAD_REQUIRED\";              // Matched orders must have a negative spread.\n\n    /// Transaction errors ///\n    string constant REENTRANCY_ILLEGAL = \"REENTRANCY_ILLEGAL\";                          // Recursive reentrancy is not allowed. \n    string constant INVALID_TX_HASH = \"INVALID_TX_HASH\";                                // Transaction has already been executed. \n    string constant INVALID_TX_SIGNATURE = \"INVALID_TX_SIGNATURE\";                      // Signature validation failed. \n    string constant FAILED_EXECUTION = \"FAILED_EXECUTION\";                              // Transaction execution failed. \n    \n    /// registerAssetProxy errors ///\n    string constant ASSET_PROXY_ALREADY_EXISTS = \"ASSET_PROXY_ALREADY_EXISTS\";          // AssetProxy with same id already exists.\n\n    /// dispatchTransferFrom errors ///\n    string constant ASSET_PROXY_DOES_NOT_EXIST = \"ASSET_PROXY_DOES_NOT_EXIST\";          // No assetProxy registered at given id.\n    string constant TRANSFER_FAILED = \"TRANSFER_FAILED\";                                // Asset transfer unsuccesful.\n\n    /// Length validation errors ///\n    string constant LENGTH_GREATER_THAN_0_REQUIRED = \"LENGTH_GREATER_THAN_0_REQUIRED\";  // Byte array must have a length greater than 0.\n    string constant LENGTH_GREATER_THAN_3_REQUIRED = \"LENGTH_GREATER_THAN_3_REQUIRED\";  // Byte array must have a length greater than 3.\n    string constant LENGTH_0_REQUIRED = \"LENGTH_0_REQUIRED\";                            // Byte array must have a length of 0.\n    string constant LENGTH_65_REQUIRED = \"LENGTH_65_REQUIRED\";                          // Byte array must have a length of 65.\n}\n",
        "protocol/Exchange/libs/LibFillResults.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"../../../utils/SafeMath/SafeMath.sol\";\n\n\ncontract LibFillResults is\n    SafeMath\n{\n    struct FillResults {\n        uint256 makerAssetFilledAmount;  // Total amount of makerAsset(s) filled.\n        uint256 takerAssetFilledAmount;  // Total amount of takerAsset(s) filled.\n        uint256 makerFeePaid;            // Total amount of ZRX paid by maker(s) to feeRecipient(s).\n        uint256 takerFeePaid;            // Total amount of ZRX paid by taker to feeRecipients(s).\n    }\n\n    struct MatchedFillResults {\n        FillResults left;                    // Amounts filled and fees paid of left order.\n        FillResults right;                   // Amounts filled and fees paid of right order.\n        uint256 leftMakerAssetSpreadAmount;  // Spread between price of left and right order, denominated in the left order's makerAsset, paid to taker.\n    }\n\n    /// @dev Adds properties of both FillResults instances.\n    ///      Modifies the first FillResults instance specified.\n    /// @param totalFillResults Fill results instance that will be added onto.\n    /// @param singleFillResults Fill results instance that will be added to totalFillResults.\n    function addFillResults(FillResults memory totalFillResults, FillResults memory singleFillResults)\n        internal\n        pure\n    {\n        totalFillResults.makerAssetFilledAmount = safeAdd(totalFillResults.makerAssetFilledAmount, singleFillResults.makerAssetFilledAmount);\n        totalFillResults.takerAssetFilledAmount = safeAdd(totalFillResults.takerAssetFilledAmount, singleFillResults.takerAssetFilledAmount);\n        totalFillResults.makerFeePaid = safeAdd(totalFillResults.makerFeePaid, singleFillResults.makerFeePaid);\n        totalFillResults.takerFeePaid = safeAdd(totalFillResults.takerFeePaid, singleFillResults.takerFeePaid);\n    }\n}\n",
        "protocol/Exchange/libs/LibMath.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"../../../utils/SafeMath/SafeMath.sol\";\n\n\ncontract LibMath is\n    SafeMath\n{\n    /// @dev Calculates partial value given a numerator and denominator rounded down.\n    ///      Reverts if rounding error is >= 0.1%\n    /// @param numerator Numerator.\n    /// @param denominator Denominator.\n    /// @param target Value to calculate partial of.\n    /// @return Partial value of target rounded down.\n    function safeGetPartialAmountFloor(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        internal\n        pure\n        returns (uint256 partialAmount)\n    {\n        require(\n            denominator > 0,\n            \"DIVISION_BY_ZERO\"\n        );\n\n        require(\n            !isRoundingErrorFloor(\n                numerator,\n                denominator,\n                target\n            ),\n            \"ROUNDING_ERROR\"\n        );\n        \n        partialAmount = safeDiv(\n            safeMul(numerator, target),\n            denominator\n        );\n        return partialAmount;\n    }\n\n    /// @dev Calculates partial value given a numerator and denominator rounded down.\n    ///      Reverts if rounding error is >= 0.1%\n    /// @param numerator Numerator.\n    /// @param denominator Denominator.\n    /// @param target Value to calculate partial of.\n    /// @return Partial value of target rounded up.\n    function safeGetPartialAmountCeil(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        internal\n        pure\n        returns (uint256 partialAmount)\n    {\n        require(\n            denominator > 0,\n            \"DIVISION_BY_ZERO\"\n        );\n\n        require(\n            !isRoundingErrorCeil(\n                numerator,\n                denominator,\n                target\n            ),\n            \"ROUNDING_ERROR\"\n        );\n        \n        // safeDiv computes `floor(a / b)`. We use the identity (a, b integer):\n        //       ceil(a / b) = floor((a + b - 1) / b)\n        // To implement `ceil(a / b)` using safeDiv.\n        partialAmount = safeDiv(\n            safeAdd(\n                safeMul(numerator, target),\n                safeSub(denominator, 1)\n            ),\n            denominator\n        );\n        return partialAmount;\n    }\n\n    /// @dev Calculates partial value given a numerator and denominator rounded down.\n    /// @param numerator Numerator.\n    /// @param denominator Denominator.\n    /// @param target Value to calculate partial of.\n    /// @return Partial value of target rounded down.\n    function getPartialAmountFloor(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        internal\n        pure\n        returns (uint256 partialAmount)\n    {\n        require(\n            denominator > 0,\n            \"DIVISION_BY_ZERO\"\n        );\n\n        partialAmount = safeDiv(\n            safeMul(numerator, target),\n            denominator\n        );\n        return partialAmount;\n    }\n    \n    /// @dev Calculates partial value given a numerator and denominator rounded down.\n    /// @param numerator Numerator.\n    /// @param denominator Denominator.\n    /// @param target Value to calculate partial of.\n    /// @return Partial value of target rounded up.\n    function getPartialAmountCeil(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        internal\n        pure\n        returns (uint256 partialAmount)\n    {\n        require(\n            denominator > 0,\n            \"DIVISION_BY_ZERO\"\n        );\n\n        // safeDiv computes `floor(a / b)`. We use the identity (a, b integer):\n        //       ceil(a / b) = floor((a + b - 1) / b)\n        // To implement `ceil(a / b)` using safeDiv.\n        partialAmount = safeDiv(\n            safeAdd(\n                safeMul(numerator, target),\n                safeSub(denominator, 1)\n            ),\n            denominator\n        );\n        return partialAmount;\n    }\n    \n    /// @dev Checks if rounding error >= 0.1% when rounding down.\n    /// @param numerator Numerator.\n    /// @param denominator Denominator.\n    /// @param target Value to multiply with numerator/denominator.\n    /// @return Rounding error is present.\n    function isRoundingErrorFloor(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        internal\n        pure\n        returns (bool isError)\n    {\n        require(\n            denominator > 0,\n            \"DIVISION_BY_ZERO\"\n        );\n        \n        // The absolute rounding error is the difference between the rounded\n        // value and the ideal value. The relative rounding error is the\n        // absolute rounding error divided by the absolute value of the\n        // ideal value. This is undefined when the ideal value is zero.\n        //\n        // The ideal value is `numerator * target / denominator`.\n        // Let's call `numerator * target % denominator` the remainder.\n        // The absolute error is `remainder / denominator`.\n        //\n        // When the ideal value is zero, we require the absolute error to\n        // be zero. Fortunately, this is always the case. The ideal value is\n        // zero iff `numerator == 0` and/or `target == 0`. In this case the\n        // remainder and absolute error are also zero. \n        if (target == 0 || numerator == 0) {\n            return false;\n        }\n        \n        // Otherwise, we want the relative rounding error to be strictly\n        // less than 0.1%.\n        // The relative error is `remainder / (numerator * target)`.\n        // We want the relative error less than 1 / 1000:\n        //        remainder / (numerator * denominator)  <  1 / 1000\n        // or equivalently:\n        //        1000 * remainder  <  numerator * target\n        // so we have a rounding error iff:\n        //        1000 * remainder  >=  numerator * target\n        uint256 remainder = mulmod(\n            target,\n            numerator,\n            denominator\n        );\n        isError = safeMul(1000, remainder) >= safeMul(numerator, target);\n        return isError;\n    }\n    \n    /// @dev Checks if rounding error >= 0.1% when rounding up.\n    /// @param numerator Numerator.\n    /// @param denominator Denominator.\n    /// @param target Value to multiply with numerator/denominator.\n    /// @return Rounding error is present.\n    function isRoundingErrorCeil(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        internal\n        pure\n        returns (bool isError)\n    {\n        require(\n            denominator > 0,\n            \"DIVISION_BY_ZERO\"\n        );\n        \n        // See the comments in `isRoundingError`.\n        if (target == 0 || numerator == 0) {\n            // When either is zero, the ideal value and rounded value are zero\n            // and there is no rounding error. (Although the relative error\n            // is undefined.)\n            return false;\n        }\n        // Compute remainder as before\n        uint256 remainder = mulmod(\n            target,\n            numerator,\n            denominator\n        );\n        remainder = safeSub(denominator, remainder) % denominator;\n        isError = safeMul(1000, remainder) >= safeMul(numerator, target);\n        return isError;\n    }\n}\n",
        "protocol/Exchange/libs/LibOrder.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"./LibEIP712.sol\";\n\n\ncontract LibOrder is\n    LibEIP712\n{\n    // Hash for the EIP712 Order Schema\n    bytes32 constant internal EIP712_ORDER_SCHEMA_HASH = keccak256(abi.encodePacked(\n        \"Order(\",\n        \"address makerAddress,\",\n        \"address takerAddress,\",\n        \"address feeRecipientAddress,\",\n        \"address senderAddress,\",\n        \"uint256 makerAssetAmount,\",\n        \"uint256 takerAssetAmount,\",\n        \"uint256 makerFee,\",\n        \"uint256 takerFee,\",\n        \"uint256 expirationTimeSeconds,\",\n        \"uint256 salt,\",\n        \"bytes makerAssetData,\",\n        \"bytes takerAssetData\",\n        \")\"\n    ));\n\n    // A valid order remains fillable until it is expired, fully filled, or cancelled.\n    // An order's state is unaffected by external factors, like account balances.\n    enum OrderStatus {\n        INVALID,                     // Default value\n        INVALID_MAKER_ASSET_AMOUNT,  // Order does not have a valid maker asset amount\n        INVALID_TAKER_ASSET_AMOUNT,  // Order does not have a valid taker asset amount\n        FILLABLE,                    // Order is fillable\n        EXPIRED,                     // Order has already expired\n        FULLY_FILLED,                // Order is fully filled\n        CANCELLED                    // Order has been cancelled\n    }\n\n    // solhint-disable max-line-length\n    struct Order {\n        address makerAddress;           // Address that created the order.      \n        address takerAddress;           // Address that is allowed to fill the order. If set to 0, any address is allowed to fill the order.          \n        address feeRecipientAddress;    // Address that will recieve fees when order is filled.      \n        address senderAddress;          // Address that is allowed to call Exchange contract methods that affect this order. If set to 0, any address is allowed to call these methods.\n        uint256 makerAssetAmount;       // Amount of makerAsset being offered by maker. Must be greater than 0.        \n        uint256 takerAssetAmount;       // Amount of takerAsset being bid on by maker. Must be greater than 0.        \n        uint256 makerFee;               // Amount of ZRX paid to feeRecipient by maker when order is filled. If set to 0, no transfer of ZRX from maker to feeRecipient will be attempted.\n        uint256 takerFee;               // Amount of ZRX paid to feeRecipient by taker when order is filled. If set to 0, no transfer of ZRX from taker to feeRecipient will be attempted.\n        uint256 expirationTimeSeconds;  // Timestamp in seconds at which order expires.          \n        uint256 salt;                   // Arbitrary number to facilitate uniqueness of the order's hash.     \n        bytes makerAssetData;           // Encoded data that can be decoded by a specified proxy contract when transferring makerAsset. The last byte references the id of this proxy.\n        bytes takerAssetData;           // Encoded data that can be decoded by a specified proxy contract when transferring takerAsset. The last byte references the id of this proxy.\n    }\n    // solhint-enable max-line-length\n\n    struct OrderInfo {\n        uint8 orderStatus;                    // Status that describes order's validity and fillability.\n        bytes32 orderHash;                    // EIP712 hash of the order (see LibOrder.getOrderHash).\n        uint256 orderTakerAssetFilledAmount;  // Amount of order that has already been filled.\n    }\n\n    /// @dev Calculates Keccak-256 hash of the order.\n    /// @param order The order structure.\n    /// @return Keccak-256 EIP712 hash of the order.\n    function getOrderHash(Order memory order)\n        internal\n        view\n        returns (bytes32 orderHash)\n    {\n        orderHash = hashEIP712Message(hashOrder(order));\n        return orderHash;\n    }\n\n    /// @dev Calculates EIP712 hash of the order.\n    /// @param order The order structure.\n    /// @return EIP712 hash of the order.\n    function hashOrder(Order memory order)\n        internal\n        pure\n        returns (bytes32 result)\n    {\n        bytes32 schemaHash = EIP712_ORDER_SCHEMA_HASH;\n        bytes32 makerAssetDataHash = keccak256(order.makerAssetData);\n        bytes32 takerAssetDataHash = keccak256(order.takerAssetData);\n\n        // Assembly for more efficiently computing:\n        // keccak256(abi.encodePacked(\n        //     EIP712_ORDER_SCHEMA_HASH,\n        //     bytes32(order.makerAddress),\n        //     bytes32(order.takerAddress),\n        //     bytes32(order.feeRecipientAddress),\n        //     bytes32(order.senderAddress),\n        //     order.makerAssetAmount,\n        //     order.takerAssetAmount,\n        //     order.makerFee,\n        //     order.takerFee,\n        //     order.expirationTimeSeconds,\n        //     order.salt,\n        //     keccak256(order.makerAssetData),\n        //     keccak256(order.takerAssetData)\n        // ));\n\n        assembly {\n            // Calculate memory addresses that will be swapped out before hashing\n            let pos1 := sub(order, 32)\n            let pos2 := add(order, 320)\n            let pos3 := add(order, 352)\n\n            // Backup\n            let temp1 := mload(pos1)\n            let temp2 := mload(pos2)\n            let temp3 := mload(pos3)\n            \n            // Hash in place\n            mstore(pos1, schemaHash)\n            mstore(pos2, makerAssetDataHash)\n            mstore(pos3, takerAssetDataHash)\n            result := keccak256(pos1, 416)\n            \n            // Restore\n            mstore(pos1, temp1)\n            mstore(pos2, temp2)\n            mstore(pos3, temp3)\n        }\n        return result;\n    }\n}\n",
        "protocol/Exchange/mixins/MAssetProxyDispatcher.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"../interfaces/IAssetProxyDispatcher.sol\";\n\n\ncontract MAssetProxyDispatcher is\n    IAssetProxyDispatcher\n{\n    // Logs registration of new asset proxy\n    event AssetProxyRegistered(\n        bytes4 id,              // Id of new registered AssetProxy.\n        address assetProxy      // Address of new registered AssetProxy.\n    );\n\n    /// @dev Forwards arguments to assetProxy and calls `transferFrom`. Either succeeds or throws.\n    /// @param assetData Byte array encoded for the asset.\n    /// @param from Address to transfer token from.\n    /// @param to Address to transfer token to.\n    /// @param amount Amount of token to transfer.\n    function dispatchTransferFrom(\n        bytes memory assetData,\n        address from,\n        address to,\n        uint256 amount\n    )\n        internal;\n}\n",
        "protocol/Exchange/mixins/MExchangeCore.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\npragma experimental ABIEncoderV2;\n\nimport \"../libs/LibOrder.sol\";\nimport \"../libs/LibFillResults.sol\";\nimport \"../interfaces/IExchangeCore.sol\";\n\n\ncontract MExchangeCore is\n    IExchangeCore\n{\n    // Fill event is emitted whenever an order is filled.\n    event Fill(\n        address indexed makerAddress,         // Address that created the order.      \n        address indexed feeRecipientAddress,  // Address that received fees.\n        address takerAddress,                 // Address that filled the order.\n        address senderAddress,                // Address that called the Exchange contract (msg.sender).\n        uint256 makerAssetFilledAmount,       // Amount of makerAsset sold by maker and bought by taker. \n        uint256 takerAssetFilledAmount,       // Amount of takerAsset sold by taker and bought by maker.\n        uint256 makerFeePaid,                 // Amount of ZRX paid to feeRecipient by maker.\n        uint256 takerFeePaid,                 // Amount of ZRX paid to feeRecipient by taker.\n        bytes32 indexed orderHash,            // EIP712 hash of order (see LibOrder.getOrderHash).\n        bytes makerAssetData,                 // Encoded data specific to makerAsset. \n        bytes takerAssetData                  // Encoded data specific to takerAsset.\n    );\n\n    // Cancel event is emitted whenever an individual order is cancelled.\n    event Cancel(\n        address indexed makerAddress,         // Address that created the order.      \n        address indexed feeRecipientAddress,  // Address that would have recieved fees if order was filled.   \n        address senderAddress,                // Address that called the Exchange contract (msg.sender).\n        bytes32 indexed orderHash,            // EIP712 hash of order (see LibOrder.getOrderHash).\n        bytes makerAssetData,                 // Encoded data specific to makerAsset. \n        bytes takerAssetData                  // Encoded data specific to takerAsset.\n    );\n\n    // CancelUpTo event is emitted whenever `cancelOrdersUpTo` is executed succesfully.\n    event CancelUpTo(\n        address indexed makerAddress,         // Orders cancelled must have been created by this address.\n        address indexed senderAddress,        // Orders cancelled must have a `senderAddress` equal to this address.\n        uint256 orderEpoch                    // Orders with specified makerAddress and senderAddress with a salt less than this value are considered cancelled.\n    );\n\n    /// @dev Fills the input order.\n    /// @param order Order struct containing order specifications.\n    /// @param takerAssetFillAmount Desired amount of takerAsset to sell.\n    /// @param signature Proof that order has been created by maker.\n    /// @return Amounts filled and fees paid by maker and taker.\n    function fillOrderInternal(\n        LibOrder.Order memory order,\n        uint256 takerAssetFillAmount,\n        bytes memory signature\n    )\n        internal\n        returns (LibFillResults.FillResults memory fillResults);\n\n    /// @dev After calling, the order can not be filled anymore.\n    /// @param order Order struct containing order specifications.\n    function cancelOrderInternal(LibOrder.Order memory order)\n        internal;\n\n    /// @dev Updates state with results of a fill order.\n    /// @param order that was filled.\n    /// @param takerAddress Address of taker who filled the order.\n    /// @param orderTakerAssetFilledAmount Amount of order already filled.\n    /// @return fillResults Amounts filled and fees paid by maker and taker.\n    function updateFilledState(\n        LibOrder.Order memory order,\n        address takerAddress,\n        bytes32 orderHash,\n        uint256 orderTakerAssetFilledAmount,\n        LibFillResults.FillResults memory fillResults\n    )\n        internal;\n\n    /// @dev Updates state with results of cancelling an order.\n    ///      State is only updated if the order is currently fillable.\n    ///      Otherwise, updating state would have no effect.\n    /// @param order that was cancelled.\n    /// @param orderHash Hash of order that was cancelled.\n    function updateCancelledState(\n        LibOrder.Order memory order,\n        bytes32 orderHash\n    )\n        internal;\n    \n    /// @dev Validates context for fillOrder. Succeeds or throws.\n    /// @param order to be filled.\n    /// @param orderInfo OrderStatus, orderHash, and amount already filled of order.\n    /// @param takerAddress Address of order taker.\n    /// @param signature Proof that the orders was created by its maker.\n    function assertFillableOrder(\n        LibOrder.Order memory order,\n        LibOrder.OrderInfo memory orderInfo,\n        address takerAddress,\n        bytes memory signature\n    )\n        internal\n        view;\n    \n    /// @dev Validates context for fillOrder. Succeeds or throws.\n    /// @param order to be filled.\n    /// @param orderInfo Status, orderHash, and amount already filled of order.\n    /// @param takerAssetFillAmount Desired amount of order to fill by taker.\n    /// @param takerAssetFilledAmount Amount of takerAsset that will be filled.\n    /// @param makerAssetFilledAmount Amount of makerAsset that will be transfered.\n    function assertValidFill(\n        LibOrder.Order memory order,\n        LibOrder.OrderInfo memory orderInfo,\n        uint256 takerAssetFillAmount,\n        uint256 takerAssetFilledAmount,\n        uint256 makerAssetFilledAmount\n    )\n        internal\n        view;\n\n    /// @dev Validates context for cancelOrder. Succeeds or throws.\n    /// @param order to be cancelled.\n    /// @param orderInfo OrderStatus, orderHash, and amount already filled of order.\n    function assertValidCancel(\n        LibOrder.Order memory order,\n        LibOrder.OrderInfo memory orderInfo\n    )\n        internal\n        view;\n\n    /// @dev Calculates amounts filled and fees paid by maker and taker.\n    /// @param order to be filled.\n    /// @param takerAssetFilledAmount Amount of takerAsset that will be filled.\n    /// @return fillResults Amounts filled and fees paid by maker and taker.\n    function calculateFillResults(\n        LibOrder.Order memory order,\n        uint256 takerAssetFilledAmount\n    )\n        internal\n        pure\n        returns (LibFillResults.FillResults memory fillResults);\n\n}\n",
        "protocol/Exchange/mixins/MMatchOrders.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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*/\npragma solidity 0.4.24;\npragma experimental ABIEncoderV2;\n\nimport \"../libs/LibOrder.sol\";\nimport \"../libs/LibFillResults.sol\";\nimport \"../interfaces/IMatchOrders.sol\";\n\n\ncontract MMatchOrders is\n    IMatchOrders\n{\n    /// @dev Validates context for matchOrders. Succeeds or throws.\n    /// @param leftOrder First order to match.\n    /// @param rightOrder Second order to match.\n    function assertValidMatch(\n        LibOrder.Order memory leftOrder,\n        LibOrder.Order memory rightOrder\n    )\n        internal\n        pure;\n\n    /// @dev Calculates fill amounts for the matched orders.\n    ///      Each order is filled at their respective price point. However, the calculations are\n    ///      carried out as though the orders are both being filled at the right order's price point.\n    ///      The profit made by the leftOrder order goes to the taker (who matched the two orders).\n    /// @param leftOrder First order to match.\n    /// @param rightOrder Second order to match.\n    /// @param leftOrderTakerAssetFilledAmount Amount of left order already filled.\n    /// @param rightOrderTakerAssetFilledAmount Amount of right order already filled.\n    /// @param matchedFillResults Amounts to fill and fees to pay by maker and taker of matched orders.\n    function calculateMatchedFillResults(\n        LibOrder.Order memory leftOrder,\n        LibOrder.Order memory rightOrder,\n        uint256 leftOrderTakerAssetFilledAmount,\n        uint256 rightOrderTakerAssetFilledAmount\n    )\n        internal\n        pure\n        returns (LibFillResults.MatchedFillResults memory matchedFillResults);\n\n}\n",
        "protocol/Exchange/mixins/MSignatureValidator.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"../interfaces/ISignatureValidator.sol\";\n\n\ncontract MSignatureValidator is\n    ISignatureValidator\n{\n    event SignatureValidatorApproval(\n        address indexed signerAddress,     // Address that approves or disapproves a contract to verify signatures.\n        address indexed validatorAddress,  // Address of signature validator contract.\n        bool approved                      // Approval or disapproval of validator contract.\n    );\n\n    // Allowed signature types.\n    enum SignatureType {\n        Illegal,         // 0x00, default value\n        Invalid,         // 0x01\n        EIP712,          // 0x02\n        EthSign,         // 0x03\n        Wallet,          // 0x04\n        Validator,       // 0x05\n        PreSigned,       // 0x06\n        NSignatureTypes  // 0x07, number of signature types. Always leave at end.\n    }\n\n    /// @dev Verifies signature using logic defined by Wallet contract.\n    /// @param hash Any 32 byte hash.\n    /// @param walletAddress Address that should have signed the given hash\n    ///                      and defines its own signature verification method.\n    /// @param signature Proof that the hash has been signed by signer.\n    /// @return True if the address recovered from the provided signature matches the input signer address.\n    function isValidWalletSignature(\n        bytes32 hash,\n        address walletAddress,\n        bytes signature\n    )\n        internal\n        view\n        returns (bool isValid);\n\n    /// @dev Verifies signature using logic defined by Validator contract.\n    /// @param validatorAddress Address of validator contract.\n    /// @param hash Any 32 byte hash.\n    /// @param signerAddress Address that should have signed the given hash.\n    /// @param signature Proof that the hash has been signed by signer.\n    /// @return True if the address recovered from the provided signature matches the input signer address.\n    function isValidValidatorSignature(\n        address validatorAddress,\n        bytes32 hash,\n        address signerAddress,\n        bytes signature\n    )\n        internal\n        view\n        returns (bool isValid);\n}\n",
        "protocol/Exchange/mixins/MTransactions.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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*/\npragma solidity 0.4.24;\n\nimport \"../interfaces/ITransactions.sol\";\n\n\ncontract MTransactions is\n    ITransactions\n{\n    // Hash for the EIP712 ZeroEx Transaction Schema\n    bytes32 constant internal EIP712_ZEROEX_TRANSACTION_SCHEMA_HASH = keccak256(abi.encodePacked(\n        \"ZeroExTransaction(\",\n        \"uint256 salt,\",\n        \"address signerAddress,\",\n        \"bytes data\",\n        \")\"\n    ));\n\n    /// @dev Calculates EIP712 hash of the Transaction.\n    /// @param salt Arbitrary number to ensure uniqueness of transaction hash.\n    /// @param signerAddress Address of transaction signer.\n    /// @param data AbiV2 encoded calldata.\n    /// @return EIP712 hash of the Transaction.\n    function hashZeroExTransaction(\n        uint256 salt,\n        address signerAddress,\n        bytes memory data\n    )\n        internal\n        pure\n        returns (bytes32 result);\n\n    /// @dev The current function will be called in the context of this address (either 0x transaction signer or `msg.sender`).\n    ///      If calling a fill function, this address will represent the taker.\n    ///      If calling a cancel function, this address will represent the maker.\n    /// @return Signer of 0x transaction if entry point is `executeTransaction`.\n    ///         `msg.sender` if entry point is any other function.\n    function getCurrentContextAddress()\n        internal\n        view\n        returns (address);\n}\n",
        "protocol/Exchange/mixins/MWrapperFunctions.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\npragma experimental ABIEncoderV2;\n\nimport \"../libs/LibOrder.sol\";\nimport \"../libs/LibFillResults.sol\";\nimport \"../interfaces/IWrapperFunctions.sol\";\n\n\ncontract MWrapperFunctions is \n    IWrapperFunctions\n{\n    /// @dev Fills the input order. Reverts if exact takerAssetFillAmount not filled.\n    /// @param order LibOrder.Order struct containing order specifications.\n    /// @param takerAssetFillAmount Desired amount of takerAsset to sell.\n    /// @param signature Proof that order has been created by maker.\n    function fillOrKillOrderInternal(\n        LibOrder.Order memory order,\n        uint256 takerAssetFillAmount,\n        bytes memory signature\n    )\n        internal\n        returns (LibFillResults.FillResults memory fillResults);\n}\n",
        "test/DummyERC20Token/DummyERC20Token.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"../../utils/Ownable/Ownable.sol\";\nimport \"../../tokens/ERC20Token/MintableERC20Token.sol\";\n\n\ncontract DummyERC20Token is \n    Ownable,\n    MintableERC20Token\n{\n    string public name;\n    string public symbol;\n    uint256 public decimals;\n    uint256 public constant MAX_MINT_AMOUNT = 10000000000000000000000;\n\n    constructor (\n        string _name,\n        string _symbol,\n        uint256 _decimals,\n        uint256 _totalSupply\n    )\n        public\n    {\n        name = _name;\n        symbol = _symbol;\n        decimals = _decimals;\n        _totalSupply = _totalSupply;\n        balances[msg.sender] = _totalSupply;\n    }\n\n    /// @dev Sets the balance of target address\n    /// @param _target Address or which balance will be updated\n    /// @param _value New balance of target address\n    function setBalance(address _target, uint256 _value)\n        external\n        onlyOwner\n    {\n        uint256 currBalance = balances[_target];\n        if (_value < currBalance) {\n            _totalSupply = safeSub(_totalSupply, safeSub(currBalance, _value));\n        } else {\n            _totalSupply = safeAdd(_totalSupply, safeSub(_value, currBalance));\n        }\n        balances[_target] = _value;\n    }\n\n    /// @dev Mints new tokens for sender\n    /// @param _value Amount of tokens to mint\n    function mint(uint256 _value)\n        external\n    {\n        require(\n            _value <= MAX_MINT_AMOUNT,\n            \"VALUE_TOO_LARGE\"\n        );\n\n        _mint(msg.sender, _value);\n    }\n}\n",
        "test/DummyERC20Token/DummyMultipleReturnERC20Token.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"./DummyERC20Token.sol\";\n\n\n// solhint-disable no-empty-blocks\ncontract DummyMultipleReturnERC20Token is\n    DummyERC20Token\n{\n    constructor (\n        string _name,\n        string _symbol,\n        uint256 _decimals,\n        uint256 _totalSupply\n    )\n        public\n        DummyERC20Token(\n            _name,\n            _symbol,\n            _decimals,\n            _totalSupply\n        )\n    {}\n\n    /// @dev send `value` token to `to` from `from` on the condition it is approved by `from`\n    /// @param _from The address of the sender\n    /// @param _to The address of the recipient\n    /// @param _value The amount of token to be transferred\n    function transferFrom(\n        address _from,\n        address _to,\n        uint256 _value\n    )\n        external\n        returns (bool)\n    {\n        emit Transfer(\n            _from,\n            _to,\n            _value\n        );\n\n        // HACK: This contract will not compile if we remove `returns (bool)`, so we manually return 64 bytes (equiavalent to true, true)\n        assembly {\n            mstore(0, 1)\n            mstore(32, 1)\n            return(0, 64)\n        }\n    }\n}\n\n",
        "test/DummyERC20Token/DummyNoReturnERC20Token.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"./DummyERC20Token.sol\";\n\n\n// solhint-disable no-empty-blocks\ncontract DummyNoReturnERC20Token is\n    DummyERC20Token\n{\n    constructor (\n        string _name,\n        string _symbol,\n        uint256 _decimals,\n        uint256 _totalSupply\n    )\n        public\n        DummyERC20Token(\n            _name,\n            _symbol,\n            _decimals,\n            _totalSupply\n        )\n    {}\n\n    /// @dev send `value` token to `to` from `msg.sender`\n    /// @param _to The address of the recipient\n    /// @param _value The amount of token to be transferred\n    function transfer(address _to, uint256 _value)\n        external\n        returns (bool)\n    {\n        require(\n            balances[msg.sender] >= _value,\n            \"ERC20_INSUFFICIENT_BALANCE\"\n        );\n        require(\n            balances[_to] + _value >= balances[_to],\n            \"UINT256_OVERFLOW\"\n        );\n\n        balances[msg.sender] -= _value;\n        balances[_to] += _value;\n\n        emit Transfer(\n            msg.sender,\n            _to,\n            _value\n        );\n\n        // HACK: This contract will not compile if we remove `returns (bool)`, so we manually return no data\n        assembly {\n            return(0, 0)\n        }\n    }\n\n    /// @dev send `value` token to `to` from `from` on the condition it is approved by `from`\n    /// @param _from The address of the sender\n    /// @param _to The address of the recipient\n    /// @param _value The amount of token to be transferred\n    function transferFrom(\n        address _from,\n        address _to,\n        uint256 _value\n    )\n        external\n        returns (bool)\n    {\n        require(\n            balances[_from] >= _value,\n            \"ERC20_INSUFFICIENT_BALANCE\"\n        );\n        require(\n            allowed[_from][msg.sender] >= _value,\n            \"ERC20_INSUFFICIENT_ALLOWANCE\"\n        );\n        require(\n            balances[_to] + _value >= balances[_to],\n            \"UINT256_OVERFLOW\"\n        );\n\n        balances[_to] += _value;\n        balances[_from] -= _value;\n        allowed[_from][msg.sender] -= _value;\n    \n        emit Transfer(\n            _from,\n            _to,\n            _value\n        );\n\n        // HACK: This contract will not compile if we remove `returns (bool)`, so we manually return no data\n        assembly {\n            return(0, 0)\n        }\n    }\n}\n\n",
        "test/DummyERC721Receiver/DummyERC721Receiver.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"../../tokens/ERC721Token/IERC721Receiver.sol\";\n\n\ncontract DummyERC721Receiver is\n    IERC721Receiver\n{\n    // Function selector for ERC721Receiver.onERC721Received\n    // 0x150b7a02\n    bytes4 constant internal ERC721_RECEIVED = bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"));\n\n    event TokenReceived(\n        address operator,\n        address from,\n        uint256 tokenId,\n        bytes data\n    );\n\n    /// @notice Handle the receipt of an NFT\n    /// @dev The ERC721 smart contract calls this function on the recipient\n    ///      after a `transfer`. This function MAY throw to revert and reject the\n    ///      transfer. Return of other than the magic value MUST result in the\n    ///      transaction being reverted.\n    ///      Note: the contract address is always the message sender.\n    /// @param _operator The address which called `safeTransferFrom` function\n    /// @param _from The address which previously owned the token\n    /// @param _tokenId The NFT identifier which is being transferred\n    /// @param _data Additional data with no specified format\n    /// @return `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`\n    ///         unless throwing\n    function onERC721Received(\n        address _operator,\n        address _from,\n        uint256 _tokenId,\n        bytes _data\n    )\n        external\n        returns (bytes4)\n    {\n        emit TokenReceived(\n            _operator,\n            _from,\n            _tokenId,\n            _data\n        );\n        return ERC721_RECEIVED;\n    }\n}\n",
        "test/DummyERC721Receiver/InvalidERC721Receiver.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"../../tokens/ERC721Token/IERC721Receiver.sol\";\n\n\ncontract InvalidERC721Receiver is\n    IERC721Receiver\n{\n    // Actual function signature is `onERC721Received(address,address,uint256,bytes)`\n    bytes4 constant internal INVALID_ERC721_RECEIVED = bytes4(keccak256(\"onERC721Received(address,uint256,bytes)\"));\n\n    event TokenReceived(\n        address operator,\n        address from,\n        uint256 tokenId,\n        bytes data\n    );\n\n    /// @notice Handle the receipt of an NFT\n    /// @dev The ERC721 smart contract calls this function on the recipient\n    ///      after a `transfer`. This function MAY throw to revert and reject the\n    ///      transfer. Return of other than the magic value MUST result in the\n    ///      transaction being reverted.\n    ///      Note: the contract address is always the message sender.\n    /// @param _operator The address which called `safeTransferFrom` function\n    /// @param _from The address which previously owned the token\n    /// @param _tokenId The NFT identifier which is being transferred\n    /// @param _data Additional data with no specified format\n    /// @return `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`\n    ///         unless throwing\n    function onERC721Received(\n        address _operator,\n        address _from,\n        uint256 _tokenId,\n        bytes _data\n    )\n        external\n        returns (bytes4)\n    {\n        emit TokenReceived(\n            _operator,\n            _from,\n            _tokenId,\n            _data\n        );\n        return INVALID_ERC721_RECEIVED;\n    }\n}\n",
        "test/DummyERC721Token/DummyERC721Token.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"../../tokens/ERC721Token/MintableERC721Token.sol\";\nimport \"../../utils/Ownable/Ownable.sol\";\n\n\n// solhint-disable no-empty-blocks\ncontract DummyERC721Token is\n    Ownable,\n    MintableERC721Token\n{\n    string public name;\n    string public symbol;\n\n    constructor (\n        string _name,\n        string _symbol\n    )\n        public\n    {\n        name = _name;\n        symbol = _symbol;\n    }\n\n    /// @dev Function to mint a new token\n    ///      Reverts if the given token ID already exists\n    /// @param _to Address of the beneficiary that will own the minted token\n    /// @param _tokenId ID of the token to be minted by the msg.sender    \n    function mint(address _to, uint256 _tokenId)\n        external\n    {\n        _mint(_to, _tokenId);\n    }\n\n    /// @dev Function to burn a token\n    ///      Reverts if the given token ID doesn't exist or not called by contract owner\n    /// @param _owner Owner of token with given token ID\n    /// @param _tokenId ID of the token to be burned by the msg.sender\n    function burn(address _owner, uint256 _tokenId)\n        external\n        onlyOwner\n    {\n        _burn(_owner, _tokenId);\n    }\n}\n",
        "test/ReentrantERC20Token/ReentrantERC20Token.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\npragma experimental ABIEncoderV2;\n\nimport \"../../utils/LibBytes/LibBytes.sol\";\nimport \"../../tokens/ERC20Token/ERC20Token.sol\";\nimport \"../../protocol/Exchange/interfaces/IExchange.sol\";\nimport \"../../protocol/Exchange/libs/LibOrder.sol\";\n\n\n// solhint-disable no-unused-vars\ncontract ReentrantERC20Token is\n    ERC20Token\n{\n    using LibBytes for bytes;\n\n    // solhint-disable-next-line var-name-mixedcase\n    IExchange internal EXCHANGE;\n\n    bytes internal constant REENTRANCY_ILLEGAL_REVERT_REASON = abi.encodeWithSelector(\n        bytes4(keccak256(\"Error(string)\")),\n        \"REENTRANCY_ILLEGAL\"\n    );\n\n    // All of these functions are potentially vulnerable to reentrancy\n    // We do not test any \"noThrow\" functions because `fillOrderNoThrow` makes a delegatecall to `fillOrder`\n    enum ExchangeFunction {\n        FILL_ORDER,\n        FILL_OR_KILL_ORDER,\n        BATCH_FILL_ORDERS,\n        BATCH_FILL_OR_KILL_ORDERS,\n        MARKET_BUY_ORDERS,\n        MARKET_SELL_ORDERS,\n        MATCH_ORDERS,\n        CANCEL_ORDER,\n        BATCH_CANCEL_ORDERS,\n        CANCEL_ORDERS_UP_TO,\n        SET_SIGNATURE_VALIDATOR_APPROVAL\n    }\n\n    uint8 internal currentFunctionId = 0;\n\n    constructor (address _exchange)\n        public\n    {\n        EXCHANGE = IExchange(_exchange);\n    }\n\n    /// @dev Set the current function that will be called when `transferFrom` is called.\n    /// @param _currentFunctionId Id that corresponds to function name.\n    function setCurrentFunction(uint8 _currentFunctionId)\n        external\n    {\n        currentFunctionId = _currentFunctionId;\n    }\n\n    /// @dev A version of `transferFrom` that attempts to reenter the Exchange contract.\n    /// @param _from The address of the sender\n    /// @param _to The address of the recipient\n    /// @param _value The amount of token to be transferred\n    function transferFrom(\n        address _from,\n        address _to,\n        uint256 _value\n    )\n        external\n        returns (bool)\n    {\n        // This order would normally be invalid, but it will be used strictly for testing reentrnacy.\n        // Any reentrancy checks will happen before any other checks that invalidate the order.\n        LibOrder.Order memory order;\n\n        // Initialize remaining null parameters\n        bytes memory signature;\n        LibOrder.Order[] memory orders;\n        uint256[] memory takerAssetFillAmounts;\n        bytes[] memory signatures;\n        bytes memory calldata;\n\n        // Create calldata for function that corresponds to currentFunctionId\n        if (currentFunctionId == uint8(ExchangeFunction.FILL_ORDER)) {\n            calldata = abi.encodeWithSelector(\n                EXCHANGE.fillOrder.selector,\n                order,\n                0,\n                signature\n            );\n        } else if (currentFunctionId == uint8(ExchangeFunction.FILL_OR_KILL_ORDER)) {\n            calldata = abi.encodeWithSelector(\n                EXCHANGE.fillOrKillOrder.selector,\n                order,\n                0,\n                signature\n            );\n        } else if (currentFunctionId == uint8(ExchangeFunction.BATCH_FILL_ORDERS)) {\n            calldata = abi.encodeWithSelector(\n                EXCHANGE.batchFillOrders.selector,\n                orders,\n                takerAssetFillAmounts,\n                signatures\n            );\n        } else if (currentFunctionId == uint8(ExchangeFunction.BATCH_FILL_OR_KILL_ORDERS)) {\n            calldata = abi.encodeWithSelector(\n                EXCHANGE.batchFillOrKillOrders.selector,\n                orders,\n                takerAssetFillAmounts,\n                signatures\n            );\n        } else if (currentFunctionId == uint8(ExchangeFunction.MARKET_BUY_ORDERS)) {\n            calldata = abi.encodeWithSelector(\n                EXCHANGE.marketBuyOrders.selector,\n                orders,\n                0,\n                signatures\n            );\n        } else if (currentFunctionId == uint8(ExchangeFunction.MARKET_SELL_ORDERS)) {\n            calldata = abi.encodeWithSelector(\n                EXCHANGE.marketSellOrders.selector,\n                orders,\n                0,\n                signatures\n            );\n        } else if (currentFunctionId == uint8(ExchangeFunction.MATCH_ORDERS)) {\n            calldata = abi.encodeWithSelector(\n                EXCHANGE.matchOrders.selector,\n                order,\n                order,\n                signature,\n                signature\n            );\n        } else if (currentFunctionId == uint8(ExchangeFunction.CANCEL_ORDER)) {\n            calldata = abi.encodeWithSelector(\n                EXCHANGE.cancelOrder.selector,\n                order\n            );\n        } else if (currentFunctionId == uint8(ExchangeFunction.BATCH_CANCEL_ORDERS)) {\n            calldata = abi.encodeWithSelector(\n                EXCHANGE.batchCancelOrders.selector,\n                orders\n            );\n        } else if (currentFunctionId == uint8(ExchangeFunction.CANCEL_ORDERS_UP_TO)) {\n            calldata = abi.encodeWithSelector(\n                EXCHANGE.cancelOrdersUpTo.selector,\n                0\n            );\n        } else if (currentFunctionId == uint8(ExchangeFunction.SET_SIGNATURE_VALIDATOR_APPROVAL)) {\n            calldata = abi.encodeWithSelector(\n                EXCHANGE.setSignatureValidatorApproval.selector,\n                address(0),\n                false\n            );\n        }\n\n        // Call Exchange function, swallow error\n        address(EXCHANGE).call(calldata);\n\n        // Revert reason is 100 bytes\n        bytes memory returnData = new bytes(100);\n\n        // Copy return data\n        assembly {\n            returndatacopy(add(returnData, 32), 0, 100)\n        }\n\n        // Revert if function reverted with REENTRANCY_ILLEGAL error\n        require(!REENTRANCY_ILLEGAL_REVERT_REASON.equals(returnData));\n\n        // Transfer will return true if function failed for any other reason\n        return true;\n    }\n}",
        "test/TestAssetProxyDispatcher/TestAssetProxyDispatcher.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"../../protocol/Exchange/MixinAssetProxyDispatcher.sol\";\n\n\ncontract TestAssetProxyDispatcher is \n    MixinAssetProxyDispatcher\n{\n    function publicDispatchTransferFrom(\n        bytes memory assetData,\n        address from,\n        address to,\n        uint256 amount\n    )\n        public\n    {\n        dispatchTransferFrom(assetData, from, to, amount);\n    }\n}\n",
        "test/TestAssetProxyOwner/TestAssetProxyOwner.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"../../protocol/AssetProxyOwner/AssetProxyOwner.sol\";\n\n\n// solhint-disable no-empty-blocks\ncontract TestAssetProxyOwner is\n    AssetProxyOwner\n{\n    constructor (\n        address[] memory _owners,\n        address[] memory _assetProxyContracts,\n        uint256 _required,\n        uint256 _secondsTimeLocked\n    )\n        public\n        AssetProxyOwner(_owners, _assetProxyContracts, _required, _secondsTimeLocked)\n    {}\n    \n    function testValidRemoveAuthorizedAddressAtIndexTx(uint256 id)\n        public\n        view\n        validRemoveAuthorizedAddressAtIndexTx(id)\n        returns (bool)\n    {\n        // Do nothing. We expect reverts through the modifier\n        return true;\n    }\n    \n    /// @dev Compares first 4 bytes of byte array to `removeAuthorizedAddressAtIndex` function selector.\n    /// @param data Transaction data.\n    /// @return Successful if data is a call to `removeAuthorizedAddressAtIndex`.\n    function isFunctionRemoveAuthorizedAddressAtIndex(bytes memory data)\n        public\n        pure\n        returns (bool)\n    {\n        return data.readBytes4(0) == REMOVE_AUTHORIZED_ADDRESS_AT_INDEX_SELECTOR;\n    }\n}\n",
        "test/TestConstants/TestConstants.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"../../utils/LibBytes/LibBytes.sol\";\n\n\n// solhint-disable max-line-length\ncontract TestConstants {\n   \n    using LibBytes for bytes;\n\n    bytes4 constant internal ERC20_PROXY_ID = bytes4(keccak256(\"ERC20Token(address)\"));\n    \n    address constant internal KOVAN_ZRX_ADDRESS = 0x6Ff6C0Ff1d68b964901F986d4C9FA3ac68346570;\n    bytes constant internal KOVAN_ZRX_ASSET_DATA = \"\\xf4\\x72\\x61\\xb0\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x6f\\xf6\\xc0\\xff\\x1d\\x68\\xb9\\x64\\x90\\x1f\\x98\\x6d\\x4c\\x9f\\xa3\\xac\\x68\\x34\\x65\\x70\";\n    \n    address constant internal MAINNET_ZRX_ADDRESS = 0xE41d2489571d322189246DaFA5ebDe1F4699F498;\n    bytes constant public MAINNET_ZRX_ASSET_DATA = \"\\xf4\\x72\\x61\\xb0\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\xe4\\x1d\\x24\\x89\\x57\\x1d\\x32\\x21\\x89\\x24\\x6d\\xaf\\xa5\\xeb\\xde\\x1f\\x46\\x99\\xf4\\x98\";\n    \n    function assertValidZrxAssetData()\n        public\n        pure\n        returns (bool)\n    {\n        bytes memory kovanZrxAssetData = abi.encodeWithSelector(ERC20_PROXY_ID, KOVAN_ZRX_ADDRESS);\n        require(\n            kovanZrxAssetData.equals(KOVAN_ZRX_ASSET_DATA),\n            \"INVALID_KOVAN_ZRX_ASSET_DATA\"\n        );\n\n        bytes memory mainetZrxAssetData = abi.encodeWithSelector(ERC20_PROXY_ID, MAINNET_ZRX_ADDRESS);\n        require(\n            mainetZrxAssetData.equals(MAINNET_ZRX_ASSET_DATA),\n            \"INVALID_MAINNET_ZRX_ASSET_DATA\"\n        );\n\n        return true;\n    }\n}\n// solhint-enable max-line-length",
        "test/TestExchangeInternals/TestExchangeInternals.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\npragma experimental ABIEncoderV2;\n\nimport \"../../protocol/Exchange/Exchange.sol\";\n\n\n// solhint-disable no-empty-blocks\ncontract TestExchangeInternals is\n    Exchange\n{\n    constructor ()\n        public\n        Exchange(\"\")\n    {}\n\n    /// @dev Adds properties of both FillResults instances.\n    ///      Modifies the first FillResults instance specified.\n    ///      Note that this function has been modified from the original\n    //       internal version to return the FillResults.\n    /// @param totalFillResults Fill results instance that will be added onto.\n    /// @param singleFillResults Fill results instance that will be added to totalFillResults.\n    /// @return newTotalFillResults The result of adding singleFillResults to totalFilResults.\n    function publicAddFillResults(FillResults memory totalFillResults, FillResults memory singleFillResults)\n        public\n        pure\n        returns (FillResults memory)\n    {\n        addFillResults(totalFillResults, singleFillResults);\n        return totalFillResults;\n    }\n\n    /// @dev Calculates amounts filled and fees paid by maker and taker.\n    /// @param order to be filled.\n    /// @param takerAssetFilledAmount Amount of takerAsset that will be filled.\n    /// @return fillResults Amounts filled and fees paid by maker and taker.\n    function publicCalculateFillResults(\n        Order memory order,\n        uint256 takerAssetFilledAmount\n    )\n        public\n        pure\n        returns (FillResults memory fillResults)\n    {\n        return calculateFillResults(order, takerAssetFilledAmount);\n    }\n\n    /// @dev Calculates partial value given a numerator and denominator.\n    ///      Reverts if rounding error is >= 0.1%\n    /// @param numerator Numerator.\n    /// @param denominator Denominator.\n    /// @param target Value to calculate partial of.\n    /// @return Partial value of target.\n    function publicSafeGetPartialAmountFloor(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        public\n        pure\n        returns (uint256 partialAmount)\n    {\n        return safeGetPartialAmountFloor(numerator, denominator, target);\n    }\n\n    /// @dev Calculates partial value given a numerator and denominator.\n    ///      Reverts if rounding error is >= 0.1%\n    /// @param numerator Numerator.\n    /// @param denominator Denominator.\n    /// @param target Value to calculate partial of.\n    /// @return Partial value of target.\n    function publicSafeGetPartialAmountCeil(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        public\n        pure\n        returns (uint256 partialAmount)\n    {\n        return safeGetPartialAmountCeil(numerator, denominator, target);\n    }\n\n    /// @dev Calculates partial value given a numerator and denominator.\n    /// @param numerator Numerator.\n    /// @param denominator Denominator.\n    /// @param target Value to calculate partial of.\n    /// @return Partial value of target.\n    function publicGetPartialAmountFloor(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        public\n        pure\n        returns (uint256 partialAmount)\n    {\n        return getPartialAmountFloor(numerator, denominator, target);\n    }\n\n    /// @dev Calculates partial value given a numerator and denominator.\n    /// @param numerator Numerator.\n    /// @param denominator Denominator.\n    /// @param target Value to calculate partial of.\n    /// @return Partial value of target.\n    function publicGetPartialAmountCeil(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        public\n        pure\n        returns (uint256 partialAmount)\n    {\n        return getPartialAmountCeil(numerator, denominator, target);\n    }\n\n    /// @dev Checks if rounding error >= 0.1%.\n    /// @param numerator Numerator.\n    /// @param denominator Denominator.\n    /// @param target Value to multiply with numerator/denominator.\n    /// @return Rounding error is present.\n    function publicIsRoundingErrorFloor(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        public\n        pure\n        returns (bool isError)\n    {\n        return isRoundingErrorFloor(numerator, denominator, target);\n    }\n\n    /// @dev Checks if rounding error >= 0.1%.\n    /// @param numerator Numerator.\n    /// @param denominator Denominator.\n    /// @param target Value to multiply with numerator/denominator.\n    /// @return Rounding error is present.\n    function publicIsRoundingErrorCeil(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        public\n        pure\n        returns (bool isError)\n    {\n        return isRoundingErrorCeil(numerator, denominator, target);\n    }\n \n    /// @dev Updates state with results of a fill order.\n    /// @param order that was filled.\n    /// @param takerAddress Address of taker who filled the order.\n    /// @param orderTakerAssetFilledAmount Amount of order already filled.\n    /// @return fillResults Amounts filled and fees paid by maker and taker.\n    function publicUpdateFilledState(\n        Order memory order,\n        address takerAddress,\n        bytes32 orderHash,\n        uint256 orderTakerAssetFilledAmount,\n        FillResults memory fillResults\n    )\n        public\n    {\n        updateFilledState(\n            order,\n            takerAddress,\n            orderHash,\n            orderTakerAssetFilledAmount,\n            fillResults\n        );\n    }\n}\n",
        "test/TestLibBytes/TestLibBytes.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"../../utils/LibBytes/LibBytes.sol\";\n\n\ncontract TestLibBytes {\n    \n    using LibBytes for bytes;\n\n    /// @dev Pops the last byte off of a byte array by modifying its length.\n    /// @param b Byte array that will be modified.\n    /// @return The byte that was popped off.\n    function publicPopLastByte(bytes memory b)\n        public\n        pure\n        returns (bytes memory, bytes1 result)\n    {\n        result = b.popLastByte();\n        return (b, result);\n    }\n\n    /// @dev Pops the last 20 bytes off of a byte array by modifying its length.\n    /// @param b Byte array that will be modified.\n    /// @return The 20 byte address that was popped off.\n    function publicPopLast20Bytes(bytes memory b)\n        public\n        pure\n        returns (bytes memory, address result)\n    {\n        result = b.popLast20Bytes();\n        return (b, result);\n    }\n\n    /// @dev Tests equality of two byte arrays.\n    /// @param lhs First byte array to compare.\n    /// @param rhs Second byte array to compare.\n    /// @return True if arrays are the same. False otherwise.\n    function publicEquals(bytes memory lhs, bytes memory rhs)\n        public\n        pure\n        returns (bool equal)\n    {\n        equal = lhs.equals(rhs);\n        return equal;\n    }\n    \n    function publicEqualsPop1(bytes memory lhs, bytes memory rhs)\n        public\n        pure\n        returns (bool equal)\n    {\n        lhs.popLastByte();\n        rhs.popLastByte();\n        equal = lhs.equals(rhs);\n        return equal;\n    }\n\n    /// @dev Performs a deep copy of a byte array onto another byte array of greater than or equal length.\n    /// @param dest Byte array that will be overwritten with source bytes.\n    /// @param source Byte array to copy onto dest bytes.\n    function publicDeepCopyBytes(\n        bytes memory dest,\n        bytes memory source\n    )\n        public\n        pure\n        returns (bytes memory)\n    {\n        LibBytes.deepCopyBytes(dest, source);\n        return dest;\n    }\n\n    /// @dev Reads an address from a position in a byte array.\n    /// @param b Byte array containing an address.\n    /// @param index Index in byte array of address.\n    /// @return address from byte array.\n    function publicReadAddress(\n        bytes memory b,\n        uint256 index\n    )\n        public\n        pure\n        returns (address result)\n    {\n        result = b.readAddress(index);\n        return result;\n    }\n\n    /// @dev Writes an address into a specific position in a byte array.\n    /// @param b Byte array to insert address into.\n    /// @param index Index in byte array of address.\n    /// @param input Address to put into byte array.\n    function publicWriteAddress(\n        bytes memory b,\n        uint256 index,\n        address input\n    )\n        public\n        pure\n        returns (bytes memory)\n    {\n        b.writeAddress(index, input);\n        return b;\n    }\n\n    /// @dev Reads a bytes32 value from a position in a byte array.\n    /// @param b Byte array containing a bytes32 value.\n    /// @param index Index in byte array of bytes32 value.\n    /// @return bytes32 value from byte array.\n    function publicReadBytes32(\n        bytes memory b,\n        uint256 index\n    )\n        public\n        pure\n        returns (bytes32 result)\n    {\n        result = b.readBytes32(index);\n        return result;\n    }\n\n    /// @dev Writes a bytes32 into a specific position in a byte array.\n    /// @param b Byte array to insert <input> into.\n    /// @param index Index in byte array of <input>.\n    /// @param input bytes32 to put into byte array.\n    function publicWriteBytes32(\n        bytes memory b,\n        uint256 index,\n        bytes32 input\n    )\n        public\n        pure\n        returns (bytes memory)\n    {\n        b.writeBytes32(index, input);\n        return b;\n    }\n\n    /// @dev Reads a uint256 value from a position in a byte array.\n    /// @param b Byte array containing a uint256 value.\n    /// @param index Index in byte array of uint256 value.\n    /// @return uint256 value from byte array.\n    function publicReadUint256(\n        bytes memory b,\n        uint256 index\n    )\n        public\n        pure\n        returns (uint256 result)\n    {\n        result = b.readUint256(index);\n        return result;\n    }\n\n    /// @dev Writes a uint256 into a specific position in a byte array.\n    /// @param b Byte array to insert <input> into.\n    /// @param index Index in byte array of <input>.\n    /// @param input uint256 to put into byte array.\n    function publicWriteUint256(\n        bytes memory b,\n        uint256 index,\n        uint256 input\n    )\n        public\n        pure\n        returns (bytes memory)\n    {\n        b.writeUint256(index, input);\n        return b;\n    }\n\n    /// @dev Reads an unpadded bytes4 value from a position in a byte array.\n    /// @param b Byte array containing a bytes4 value.\n    /// @param index Index in byte array of bytes4 value.\n    /// @return bytes4 value from byte array.\n    function publicReadBytes4(\n        bytes memory b,\n        uint256 index\n    )\n        public\n        pure\n        returns (bytes4 result)\n    {\n        result = b.readBytes4(index);\n        return result;\n    }\n\n    /// @dev Reads nested bytes from a specific position.\n    /// @param b Byte array containing nested bytes.\n    /// @param index Index of nested bytes.\n    /// @return result Nested bytes.\n    function publicReadBytesWithLength(\n        bytes memory b,\n        uint256 index\n    )\n        public\n        pure\n        returns (bytes memory result)\n    {\n        result = b.readBytesWithLength(index);\n        return result;\n    }\n\n    /// @dev Inserts bytes at a specific position in a byte array.\n    /// @param b Byte array to insert <input> into.\n    /// @param index Index in byte array of <input>.\n    /// @param input bytes to insert.\n    /// @return b Updated input byte array\n    function publicWriteBytesWithLength(\n        bytes memory b,\n        uint256 index,\n        bytes memory input\n    )\n        public\n        pure\n        returns (bytes memory)\n    {\n        b.writeBytesWithLength(index, input);\n        return b;\n    }\n    \n    /// @dev Copies a block of memory from one location to another.\n    /// @param mem Memory contents we want to apply memCopy to\n    /// @param dest Destination offset into <mem>.\n    /// @param source Source offset into <mem>.\n    /// @param length Length of bytes to copy from <source> to <dest>\n    /// @return mem Memory contents after calling memCopy.\n    function testMemcpy(\n        bytes mem,\n        uint256 dest,\n        uint256 source,\n        uint256 length\n    )\n        public // not external, we need input in memory\n        pure\n        returns (bytes)\n    {\n        // Sanity check. Overflows are not checked.\n        require(source + length <= mem.length);\n        require(dest + length <= mem.length);\n\n        // Get pointer to memory contents\n        uint256 offset = mem.contentAddress();\n\n        // Execute memCopy adjusted for memory array location\n        LibBytes.memCopy(offset + dest, offset + source, length);\n\n        // Return modified memory contents\n        return mem;\n    }\n}\n",
        "test/TestLibs/TestLibs.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\npragma experimental ABIEncoderV2;\n\nimport \"../../protocol/Exchange/libs/LibMath.sol\";\nimport \"../../protocol/Exchange/libs/LibOrder.sol\";\nimport \"../../protocol/Exchange/libs/LibFillResults.sol\";\nimport \"../../protocol/Exchange/libs/LibAbiEncoder.sol\";\n\n\ncontract TestLibs is \n    LibMath,\n    LibOrder,\n    LibFillResults,\n    LibAbiEncoder\n{\n    function publicAbiEncodeFillOrder(\n        Order memory order,\n        uint256 takerAssetFillAmount,\n        bytes memory signature\n    )\n        public\n        pure\n        returns (bytes memory fillOrderCalldata)\n    {\n        fillOrderCalldata = abiEncodeFillOrder(\n            order,\n            takerAssetFillAmount,\n            signature\n        );\n        return fillOrderCalldata;\n    }\n\n    function publicGetPartialAmountFloor(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        public\n        pure\n        returns (uint256 partialAmount)\n    {\n        partialAmount = getPartialAmountFloor(\n            numerator,\n            denominator,\n            target\n        );\n        return partialAmount;\n    }\n\n    function publicGetPartialAmountCeil(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        public\n        pure\n        returns (uint256 partialAmount)\n    {\n        partialAmount = getPartialAmountCeil(\n            numerator,\n            denominator,\n            target\n        );\n        return partialAmount;\n    }\n\n    function publicIsRoundingErrorFloor(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        public\n        pure\n        returns (bool isError)\n    {\n        isError = isRoundingErrorFloor(\n            numerator,\n            denominator,\n            target\n        );\n        return isError;\n    }\n\n    function publicIsRoundingErrorCeil(\n        uint256 numerator,\n        uint256 denominator,\n        uint256 target\n    )\n        public\n        pure\n        returns (bool isError)\n    {\n        isError = isRoundingErrorCeil(\n            numerator,\n            denominator,\n            target\n        );\n        return isError;\n    }\n\n    function publicGetOrderHash(Order memory order)\n        public\n        view\n        returns (bytes32 orderHash)\n    {\n        orderHash = getOrderHash(order);\n        return orderHash;\n    }\n\n    function getOrderSchemaHash()\n        public\n        pure\n        returns (bytes32)\n    {\n        return EIP712_ORDER_SCHEMA_HASH;\n    }\n\n    function getDomainSeparatorSchemaHash()\n        public\n        pure\n        returns (bytes32)\n    {\n        return EIP712_DOMAIN_SEPARATOR_SCHEMA_HASH;\n    }\n\n    function publicAddFillResults(FillResults memory totalFillResults, FillResults memory singleFillResults)\n        public\n        pure\n        returns (FillResults memory)\n    {\n        addFillResults(totalFillResults, singleFillResults);\n        return totalFillResults;\n    }\n}\n",
        "test/TestSignatureValidator/TestSignatureValidator.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"../../protocol/Exchange/MixinSignatureValidator.sol\";\nimport \"../../protocol/Exchange/MixinTransactions.sol\";\n\n\ncontract TestSignatureValidator is\n    MixinSignatureValidator,\n    MixinTransactions\n{\n    function publicIsValidSignature(\n        bytes32 hash,\n        address signer,\n        bytes memory signature\n    )\n        public\n        view\n        returns (bool isValid)\n    {\n        isValid = isValidSignature(\n            hash,\n            signer,\n            signature\n        );\n        return isValid;\n    }\n}\n",
        "test/TestStaticCallReceiver/TestStaticCallReceiver.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"../../tokens/ERC20Token/IERC20Token.sol\";\n\n\n// solhint-disable no-unused-vars\ncontract TestStaticCallReceiver {\n\n    uint256 internal state = 1;\n\n    /// @dev Updates state and returns true. Intended to be used with `Validator` signature type.\n    /// @param hash Message hash that is signed.\n    /// @param signerAddress Address that should have signed the given hash.\n    /// @param signature Proof of signing.\n    /// @return Validity of order signature.\n    function isValidSignature(\n        bytes32 hash,\n        address signerAddress,\n        bytes signature\n    )\n        external\n        returns (bool isValid)\n    {\n        updateState();\n        return true;\n    }\n\n    /// @dev Updates state and returns true. Intended to be used with `Wallet` signature type.\n    /// @param hash Message hash that is signed.\n    /// @param signature Proof of signing.\n    /// @return Validity of order signature.\n    function isValidSignature(\n        bytes32 hash,\n        bytes signature\n    )\n        external\n        returns (bool isValid)\n    {\n        updateState();\n        return true;\n    }\n\n    /// @dev Approves an ERC20 token to spend tokens from this address.\n    /// @param token Address of ERC20 token.\n    /// @param spender Address that will spend tokens.\n    /// @param value Amount of tokens spender is approved to spend.\n    function approveERC20(\n        address token,\n        address spender,\n        uint256 value\n    )\n        external\n    {\n        IERC20Token(token).approve(spender, value);\n    }\n\n    /// @dev Increments state variable.\n    function updateState()\n        internal\n    {\n        state++;\n    }\n}\n",
        "tokens/ERC20Token/ERC20Token.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"./IERC20Token.sol\";\n\n\ncontract ERC20Token is\n    IERC20Token\n{\n    mapping (address => uint256) internal balances;\n    mapping (address => mapping (address => uint256)) internal allowed;\n\n    uint256 internal _totalSupply;\n\n    /// @dev send `value` token to `to` from `msg.sender`\n    /// @param _to The address of the recipient\n    /// @param _value The amount of token to be transferred\n    /// @return True if transfer was successful\n    function transfer(address _to, uint256 _value)\n        external\n        returns (bool)\n    {\n        require(\n            balances[msg.sender] >= _value,\n            \"ERC20_INSUFFICIENT_BALANCE\"\n        );\n        require(\n            balances[_to] + _value >= balances[_to],\n            \"UINT256_OVERFLOW\"\n        );\n\n        balances[msg.sender] -= _value;\n        balances[_to] += _value;\n\n        emit Transfer(\n            msg.sender,\n            _to,\n            _value\n        );\n\n        return true;\n    }\n\n    /// @dev send `value` token to `to` from `from` on the condition it is approved by `from`\n    /// @param _from The address of the sender\n    /// @param _to The address of the recipient\n    /// @param _value The amount of token to be transferred\n    /// @return True if transfer was successful\n    function transferFrom(\n        address _from,\n        address _to,\n        uint256 _value\n    )\n        external\n        returns (bool)\n    {\n        require(\n            balances[_from] >= _value,\n            \"ERC20_INSUFFICIENT_BALANCE\"\n        );\n        require(\n            allowed[_from][msg.sender] >= _value,\n            \"ERC20_INSUFFICIENT_ALLOWANCE\"\n        );\n        require(\n            balances[_to] + _value >= balances[_to],\n            \"UINT256_OVERFLOW\"\n        );\n\n        balances[_to] += _value;\n        balances[_from] -= _value;\n        allowed[_from][msg.sender] -= _value;\n    \n        emit Transfer(\n            _from,\n            _to,\n            _value\n        );\n    \n        return true;\n    }\n\n    /// @dev `msg.sender` approves `_spender` to spend `_value` tokens\n    /// @param _spender The address of the account able to transfer the tokens\n    /// @param _value The amount of wei to be approved for transfer\n    /// @return Always true if the call has enough gas to complete execution\n    function approve(address _spender, uint256 _value)\n        external\n        returns (bool)\n    {\n        allowed[msg.sender][_spender] = _value;\n        emit Approval(\n            msg.sender,\n            _spender,\n            _value\n        );\n        return true;\n    }\n\n    /// @dev Query total supply of token\n    /// @return Total supply of token\n    function totalSupply()\n        external\n        view\n        returns (uint256)\n    {\n        return _totalSupply;\n    }\n\n    /// @dev Query the balance of owner\n    /// @param _owner The address from which the balance will be retrieved\n    /// @return Balance of owner\n    function balanceOf(address _owner)\n        external\n        view\n        returns (uint256)\n    {\n        return balances[_owner];\n    }\n\n    /// @param _owner The address of the account owning tokens\n    /// @param _spender The address of the account able to transfer the tokens\n    /// @return Amount of remaining tokens allowed to spent\n    function allowance(address _owner, address _spender)\n        external\n        view\n        returns (uint256)\n    {\n        return allowed[_owner][_spender];\n    }\n}\n",
        "tokens/ERC20Token/IERC20Token.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\n\ncontract IERC20Token {\n\n    // solhint-disable no-simple-event-func-name\n    event Transfer(\n        address indexed _from,\n        address indexed _to,\n        uint256 _value\n    );\n\n    event Approval(\n        address indexed _owner,\n        address indexed _spender,\n        uint256 _value\n    );\n\n    /// @dev send `value` token to `to` from `msg.sender`\n    /// @param _to The address of the recipient\n    /// @param _value The amount of token to be transferred\n    /// @return True if transfer was successful\n    function transfer(address _to, uint256 _value)\n        external\n        returns (bool);\n\n    /// @dev send `value` token to `to` from `from` on the condition it is approved by `from`\n    /// @param _from The address of the sender\n    /// @param _to The address of the recipient\n    /// @param _value The amount of token to be transferred\n    /// @return True if transfer was successful\n    function transferFrom(\n        address _from,\n        address _to,\n        uint256 _value\n    )\n        external\n        returns (bool);\n    \n    /// @dev `msg.sender` approves `_spender` to spend `_value` tokens\n    /// @param _spender The address of the account able to transfer the tokens\n    /// @param _value The amount of wei to be approved for transfer\n    /// @return Always true if the call has enough gas to complete execution\n    function approve(address _spender, uint256 _value)\n        external\n        returns (bool);\n\n    /// @dev Query total supply of token\n    /// @return Total supply of token\n    function totalSupply()\n        external\n        view\n        returns (uint256);\n    \n    /// @param _owner The address from which the balance will be retrieved\n    /// @return Balance of owner\n    function balanceOf(address _owner)\n        external\n        view\n        returns (uint256);\n\n    /// @param _owner The address of the account owning tokens\n    /// @param _spender The address of the account able to transfer the tokens\n    /// @return Amount of remaining tokens allowed to spent\n    function allowance(address _owner, address _spender)\n        external\n        view\n        returns (uint256);\n}\n",
        "tokens/ERC20Token/MintableERC20Token.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"../../utils/SafeMath/SafeMath.sol\";\nimport \"./UnlimitedAllowanceERC20Token.sol\";\n\n\ncontract MintableERC20Token is \n    SafeMath,\n    UnlimitedAllowanceERC20Token\n{\n    /// @dev Mints new tokens\n    /// @param _to Address of the beneficiary that will own the minted token\n    /// @param _value Amount of tokens to mint\n    function _mint(address _to, uint256 _value)\n        internal\n    {\n        balances[_to] = safeAdd(_value, balances[_to]);\n        _totalSupply = safeAdd(_totalSupply, _value);\n\n        emit Transfer(\n            address(0),\n            _to,\n            _value\n        );\n    }\n\n    /// @dev Mints new tokens\n    /// @param _owner Owner of tokens that will be burned\n    /// @param _value Amount of tokens to burn\n    function _burn(address _owner, uint256 _value)\n        internal\n    {\n        balances[_owner] = safeSub(balances[_owner], _value);\n        _totalSupply = safeSub(_totalSupply, _value);\n\n        emit Transfer(\n            _owner,\n            address(0),\n            _value\n        );\n    }\n}\n",
        "tokens/ERC20Token/UnlimitedAllowanceERC20Token.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"../ERC20Token/ERC20Token.sol\";\n\n\ncontract UnlimitedAllowanceERC20Token is\n    ERC20Token\n{\n    uint256 constant internal MAX_UINT = 2**256 - 1;\n\n    /// @dev ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited allowance. See https://github.com/ethereum/EIPs/issues/717\n    /// @param _from Address to transfer from.\n    /// @param _to Address to transfer to.\n    /// @param _value Amount to transfer.\n    /// @return Success of transfer.\n    function transferFrom(\n        address _from,\n        address _to,\n        uint256 _value\n    )\n        external\n        returns (bool)\n    {\n        uint256 allowance = allowed[_from][msg.sender];\n        require(\n            balances[_from] >= _value,\n            \"ERC20_INSUFFICIENT_BALANCE\"\n        );\n        require(\n            allowance >= _value,\n            \"ERC20_INSUFFICIENT_ALLOWANCE\"\n        );\n        require(\n            balances[_to] + _value >= balances[_to],\n            \"UINT256_OVERFLOW\"\n        );\n\n        balances[_to] += _value;\n        balances[_from] -= _value;\n        if (allowance < MAX_UINT) {\n            allowed[_from][msg.sender] -= _value;\n        }\n\n        emit Transfer(\n            _from,\n            _to,\n            _value\n        );\n\n        return true;\n    }\n}\n",
        "tokens/ERC721Token/ERC721Token.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"./IERC721Token.sol\";\nimport \"./IERC721Receiver.sol\";\nimport \"../../utils/SafeMath/SafeMath.sol\";\n\n\ncontract ERC721Token is\n    IERC721Token,\n    SafeMath\n{\n    // Function selector for ERC721Receiver.onERC721Received\n    // 0x150b7a02\n    bytes4 constant internal ERC721_RECEIVED = bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"));\n\n    // Mapping of tokenId => owner\n    mapping (uint256 => address) internal owners;\n\n    // Mapping of tokenId => approved address\n    mapping (uint256 => address) internal approvals;\n\n    // Mapping of owner => number of tokens owned\n    mapping (address => uint256) internal balances;\n\n    // Mapping of owner => operator => approved\n    mapping (address => mapping (address => bool)) internal operatorApprovals;\n\n    /// @notice Transfers the ownership of an NFT from one address to another address\n    /// @dev Throws unless `msg.sender` is the current owner, an authorized\n    ///      operator, or the approved address for this NFT. Throws if `_from` is\n    ///      not the current owner. Throws if `_to` is the zero address. Throws if\n    ///      `_tokenId` is not a valid NFT. When transfer is complete, this function\n    ///      checks if `_to` is a smart contract (code size > 0). If so, it calls\n    ///      `onERC721Received` on `_to` and throws if the return value is not\n    ///      `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`.\n    /// @param _from The current owner of the NFT\n    /// @param _to The new owner\n    /// @param _tokenId The NFT to transfer\n    /// @param _data Additional data with no specified format, sent in call to `_to`\n    function safeTransferFrom(\n        address _from,\n        address _to,\n        uint256 _tokenId,\n        bytes _data\n    )\n        external\n    {\n        transferFrom(\n            _from,\n            _to,\n            _tokenId\n        );\n\n        uint256 receiverCodeSize;\n        assembly {\n            receiverCodeSize := extcodesize(_to)\n        }\n        if (receiverCodeSize > 0) {\n            bytes4 selector = IERC721Receiver(_to).onERC721Received(\n                msg.sender,\n                _from,\n                _tokenId,\n                _data\n            );\n            require(\n                selector == ERC721_RECEIVED,\n                \"ERC721_INVALID_SELECTOR\"\n            );\n        }\n    }\n\n    /// @notice Transfers the ownership of an NFT from one address to another address\n    /// @dev This works identically to the other function with an extra data parameter,\n    ///      except this function just sets data to \"\".\n    /// @param _from The current owner of the NFT\n    /// @param _to The new owner\n    /// @param _tokenId The NFT to transfer\n    function safeTransferFrom(\n        address _from,\n        address _to,\n        uint256 _tokenId\n    )\n        external\n    {\n        transferFrom(\n            _from,\n            _to,\n            _tokenId\n        );\n\n        uint256 receiverCodeSize;\n        assembly {\n            receiverCodeSize := extcodesize(_to)\n        }\n        if (receiverCodeSize > 0) {\n            bytes4 selector = IERC721Receiver(_to).onERC721Received(\n                msg.sender,\n                _from,\n                _tokenId,\n                \"\"\n            );\n            require(\n                selector == ERC721_RECEIVED,\n                \"ERC721_INVALID_SELECTOR\"\n            );\n        }\n    }\n\n    /// @notice Change or reaffirm the approved address for an NFT\n    /// @dev The zero address indicates there is no approved address.\n    ///      Throws unless `msg.sender` is the current NFT owner, or an authorized\n    ///      operator of the current owner.\n    /// @param _approved The new approved NFT controller\n    /// @param _tokenId The NFT to approve\n    function approve(address _approved, uint256 _tokenId)\n        external\n    {\n        address owner = ownerOf(_tokenId);\n        require(\n            msg.sender == owner || isApprovedForAll(owner, msg.sender),\n            \"ERC721_INVALID_SENDER\"\n        );\n\n        approvals[_tokenId] = _approved;\n        emit Approval(\n            owner,\n            _approved,\n            _tokenId\n        );\n    }\n\n    /// @notice Enable or disable approval for a third party (\"operator\") to manage\n    ///         all of `msg.sender`'s assets\n    /// @dev Emits the ApprovalForAll event. The contract MUST allow\n    ///      multiple operators per owner.\n    /// @param _operator Address to add to the set of authorized operators\n    /// @param _approved True if the operator is approved, false to revoke approval\n    function setApprovalForAll(address _operator, bool _approved)\n        external\n    {\n        operatorApprovals[msg.sender][_operator] = _approved;\n        emit ApprovalForAll(\n            msg.sender,\n            _operator,\n            _approved\n        );\n    }\n    \n    /// @notice Count all NFTs assigned to an owner\n    /// @dev NFTs assigned to the zero address are considered invalid, and this\n    ///      function throws for queries about the zero address.\n    /// @param _owner An address for whom to query the balance\n    /// @return The number of NFTs owned by `_owner`, possibly zero\n    function balanceOf(address _owner)\n        external\n        view\n        returns (uint256)\n    {\n        require(\n            _owner != address(0),\n            \"ERC721_ZERO_OWNER\"\n        );\n        return balances[_owner];\n    }\n\n    /// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE\n    ///         TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE\n    ///         THEY MAY BE PERMANENTLY LOST\n    /// @dev Throws unless `msg.sender` is the current owner, an authorized\n    ///      operator, or the approved address for this NFT. Throws if `_from` is\n    ///      not the current owner. Throws if `_to` is the zero address. Throws if\n    ///      `_tokenId` is not a valid NFT.\n    /// @param _from The current owner of the NFT\n    /// @param _to The new owner\n    /// @param _tokenId The NFT to transfer\n    function transferFrom(\n        address _from,\n        address _to,\n        uint256 _tokenId\n    )\n        public\n    {\n        require(\n            _to != address(0),\n            \"ERC721_ZERO_TO_ADDRESS\"\n        );\n\n        address owner = ownerOf(_tokenId);\n        require(\n            _from == owner,\n            \"ERC721_OWNER_MISMATCH\"\n        );\n\n        address spender = msg.sender;\n        address approvedAddress = getApproved(_tokenId);\n        require(\n            spender == owner ||\n            isApprovedForAll(owner, spender) ||\n            approvedAddress == spender,\n            \"ERC721_INVALID_SPENDER\"\n        );\n\n        if (approvedAddress != address(0)) {\n            approvals[_tokenId] = address(0);\n        }\n\n        owners[_tokenId] = _to;\n        balances[_from] = safeSub(balances[_from], 1);\n        balances[_to] = safeAdd(balances[_to], 1);\n    \n        emit Transfer(\n            _from,\n            _to,\n            _tokenId\n        );\n    }\n\n    /// @notice Find the owner of an NFT\n    /// @dev NFTs assigned to zero address are considered invalid, and queries\n    ///      about them do throw.\n    /// @param _tokenId The identifier for an NFT\n    /// @return The address of the owner of the NFT\n    function ownerOf(uint256 _tokenId)\n        public\n        view\n        returns (address)\n    {\n        address owner = owners[_tokenId];\n        require(\n            owner != address(0),\n            \"ERC721_ZERO_OWNER\"\n        );\n        return owner;\n    }\n\n    /// @notice Get the approved address for a single NFT\n    /// @dev Throws if `_tokenId` is not a valid NFT.\n    /// @param _tokenId The NFT to find the approved address for\n    /// @return The approved address for this NFT, or the zero address if there is none\n    function getApproved(uint256 _tokenId)\n        public\n        view\n        returns (address)\n    {\n        return approvals[_tokenId];\n    }\n\n    /// @notice Query if an address is an authorized operator for another address\n    /// @param _owner The address that owns the NFTs\n    /// @param _operator The address that acts on behalf of the owner\n    /// @return True if `_operator` is an approved operator for `_owner`, false otherwise\n    function isApprovedForAll(address _owner, address _operator)\n        public\n        view\n        returns (bool)\n    {\n        return operatorApprovals[_owner][_operator];\n    }\n}\n",
        "tokens/ERC721Token/IERC721Receiver.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\n\ncontract IERC721Receiver {\n\n    /// @notice Handle the receipt of an NFT\n    /// @dev The ERC721 smart contract calls this function on the recipient\n    ///  after a `transfer`. This function MAY throw to revert and reject the\n    ///  transfer. Return of other than the magic value MUST result in the\n    ///  transaction being reverted.\n    ///  Note: the contract address is always the message sender.\n    /// @param _operator The address which called `safeTransferFrom` function\n    /// @param _from The address which previously owned the token\n    /// @param _tokenId The NFT identifier which is being transferred\n    /// @param _data Additional data with no specified format\n    /// @return `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`\n    ///  unless throwing\n    function onERC721Received(\n        address _operator,\n        address _from,\n        uint256 _tokenId,\n        bytes _data\n    )\n        external\n        returns (bytes4);\n}\n",
        "tokens/ERC721Token/IERC721Token.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\n\ncontract IERC721Token {\n\n    /// @dev This emits when ownership of any NFT changes by any mechanism.\n    ///      This event emits when NFTs are created (`from` == 0) and destroyed\n    ///      (`to` == 0). Exception: during contract creation, any number of NFTs\n    ///      may be created and assigned without emitting Transfer. At the time of\n    ///      any transfer, the approved address for that NFT (if any) is reset to none.\n    event Transfer(\n        address indexed _from,\n        address indexed _to,\n        uint256 indexed _tokenId\n    );\n\n    /// @dev This emits when the approved address for an NFT is changed or\n    ///      reaffirmed. The zero address indicates there is no approved address.\n    ///      When a Transfer event emits, this also indicates that the approved\n    ///      address for that NFT (if any) is reset to none.\n    event Approval(\n        address indexed _owner,\n        address indexed _approved,\n        uint256 indexed _tokenId\n    );\n\n    /// @dev This emits when an operator is enabled or disabled for an owner.\n    ///      The operator can manage all NFTs of the owner.\n    event ApprovalForAll(\n        address indexed _owner,\n        address indexed _operator,\n        bool _approved\n    );\n\n    /// @notice Transfers the ownership of an NFT from one address to another address\n    /// @dev Throws unless `msg.sender` is the current owner, an authorized\n    ///      perator, or the approved address for this NFT. Throws if `_from` is\n    ///      not the current owner. Throws if `_to` is the zero address. Throws if\n    ///      `_tokenId` is not a valid NFT. When transfer is complete, this function\n    ///      checks if `_to` is a smart contract (code size > 0). If so, it calls\n    ///      `onERC721Received` on `_to` and throws if the return value is not\n    ///      `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`.\n    /// @param _from The current owner of the NFT\n    /// @param _to The new owner\n    /// @param _tokenId The NFT to transfer\n    /// @param _data Additional data with no specified format, sent in call to `_to`\n    function safeTransferFrom(\n        address _from,\n        address _to,\n        uint256 _tokenId,\n        bytes _data\n    )\n        external;\n\n    /// @notice Transfers the ownership of an NFT from one address to another address\n    /// @dev This works identically to the other function with an extra data parameter,\n    ///      except this function just sets data to \"\".\n    /// @param _from The current owner of the NFT\n    /// @param _to The new owner\n    /// @param _tokenId The NFT to transfer\n    function safeTransferFrom(\n        address _from,\n        address _to,\n        uint256 _tokenId\n    )\n        external;\n\n    /// @notice Change or reaffirm the approved address for an NFT\n    /// @dev The zero address indicates there is no approved address.\n    ///      Throws unless `msg.sender` is the current NFT owner, or an authorized\n    ///      operator of the current owner.\n    /// @param _approved The new approved NFT controller\n    /// @param _tokenId The NFT to approve\n    function approve(address _approved, uint256 _tokenId)\n        external;\n\n    /// @notice Enable or disable approval for a third party (\"operator\") to manage\n    ///         all of `msg.sender`'s assets\n    /// @dev Emits the ApprovalForAll event. The contract MUST allow\n    ///      multiple operators per owner.\n    /// @param _operator Address to add to the set of authorized operators\n    /// @param _approved True if the operator is approved, false to revoke approval\n    function setApprovalForAll(address _operator, bool _approved)\n        external;\n\n    /// @notice Count all NFTs assigned to an owner\n    /// @dev NFTs assigned to the zero address are considered invalid, and this\n    ///      function throws for queries about the zero address.\n    /// @param _owner An address for whom to query the balance\n    /// @return The number of NFTs owned by `_owner`, possibly zero\n    function balanceOf(address _owner)\n        external\n        view\n        returns (uint256);\n\n    /// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE\n    ///         TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE\n    ///         THEY MAY BE PERMANENTLY LOST\n    /// @dev Throws unless `msg.sender` is the current owner, an authorized\n    ///      operator, or the approved address for this NFT. Throws if `_from` is\n    ///      not the current owner. Throws if `_to` is the zero address. Throws if\n    ///      `_tokenId` is not a valid NFT.\n    /// @param _from The current owner of the NFT\n    /// @param _to The new owner\n    /// @param _tokenId The NFT to transfer\n    function transferFrom(\n        address _from,\n        address _to,\n        uint256 _tokenId\n    )\n        public;\n\n    /// @notice Find the owner of an NFT\n    /// @dev NFTs assigned to zero address are considered invalid, and queries\n    ///      about them do throw.\n    /// @param _tokenId The identifier for an NFT\n    /// @return The address of the owner of the NFT\n    function ownerOf(uint256 _tokenId)\n        public\n        view\n        returns (address);\n\n    /// @notice Get the approved address for a single NFT\n    /// @dev Throws if `_tokenId` is not a valid NFT.\n    /// @param _tokenId The NFT to find the approved address for\n    /// @return The approved address for this NFT, or the zero address if there is none\n    function getApproved(uint256 _tokenId) \n        public\n        view\n        returns (address);\n    \n    /// @notice Query if an address is an authorized operator for another address\n    /// @param _owner The address that owns the NFTs\n    /// @param _operator The address that acts on behalf of the owner\n    /// @return True if `_operator` is an approved operator for `_owner`, false otherwise\n    function isApprovedForAll(address _owner, address _operator)\n        public\n        view\n        returns (bool);\n}\n",
        "tokens/ERC721Token/MintableERC721Token.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"./ERC721Token.sol\";\n\n\ncontract MintableERC721Token is\n    ERC721Token\n{\n    /// @dev Function to mint a new token\n    ///      Reverts if the given token ID already exists\n    /// @param _to Address of the beneficiary that will own the minted token\n    /// @param _tokenId ID of the token to be minted by the msg.sender    \n    function _mint(address _to, uint256 _tokenId)\n        internal\n    {\n        require(\n            _to != address(0),\n            \"ERC721_ZERO_TO_ADDRESS\"\n        );\n\n        address owner = owners[_tokenId];\n        require(\n            owner == address(0),\n            \"ERC721_OWNER_ALREADY_EXISTS\"\n        );\n\n        owners[_tokenId] = _to;\n        balances[_to] = safeAdd(balances[_to], 1);\n\n        emit Transfer(\n            address(0),\n            _to,\n            _tokenId\n        );\n    }\n\n    /// @dev Function to burn a token\n    ///      Reverts if the given token ID doesn't exist\n    /// @param _owner Owner of token with given token ID\n    /// @param _tokenId ID of the token to be burned by the msg.sender\n    function _burn(address _owner, uint256 _tokenId)\n        internal\n    {\n        require(\n            _owner != address(0),\n            \"ERC721_ZERO_OWNER_ADDRESS\"\n        );\n\n        address owner = owners[_tokenId];\n        require(\n            owner == _owner,\n            \"ERC721_OWNER_MISMATCH\"\n        );\n\n        owners[_tokenId] = address(0);\n        balances[_owner] = safeSub(balances[_owner], 1);\n\n        emit Transfer(\n            _owner,\n            address(0),\n            _tokenId\n        );\n    }\n}\n",
        "tokens/EtherToken/IEtherToken.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\nimport \"../ERC20Token/IERC20Token.sol\";\n\n\ncontract IEtherToken is\n    IERC20Token\n{\n    function deposit()\n        public\n        payable;\n    \n    function withdraw(uint256 amount)\n        public;\n}\n",
        "tokens/EtherToken/WETH9.sol": "// Copyright (C) 2015, 2016, 2017 Dapphub\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\n// solhint-disable\npragma solidity ^0.4.18;\n\n\ncontract WETH9 {\n    string public name     = \"Wrapped Ether\";\n    string public symbol   = \"WETH\";\n    uint8  public decimals = 18;\n\n    event  Approval(address indexed _owner, address indexed _spender, uint _value);\n    event  Transfer(address indexed _from, address indexed _to, uint _value);\n    event  Deposit(address indexed _owner, uint _value);\n    event  Withdrawal(address indexed _owner, uint _value);\n\n    mapping (address => uint)                       public  balanceOf;\n    mapping (address => mapping (address => uint))  public  allowance;\n\n    function() public payable {\n        deposit();\n    }\n    function deposit() public payable {\n        balanceOf[msg.sender] += msg.value;\n        Deposit(msg.sender, msg.value);\n    }\n    function withdraw(uint wad) public {\n        require(balanceOf[msg.sender] >= wad);\n        balanceOf[msg.sender] -= wad;\n        msg.sender.transfer(wad);\n        Withdrawal(msg.sender, wad);\n    }\n\n    function totalSupply() public view returns (uint) {\n        return this.balance;\n    }\n\n    function approve(address guy, uint wad) public returns (bool) {\n        allowance[msg.sender][guy] = wad;\n        Approval(msg.sender, guy, wad);\n        return true;\n    }\n\n    function transfer(address dst, uint wad) public returns (bool) {\n        return transferFrom(msg.sender, dst, wad);\n    }\n\n    function transferFrom(address src, address dst, uint wad)\n        public\n        returns (bool)\n    {\n        require(balanceOf[src] >= wad);\n\n        if (src != msg.sender && allowance[src][msg.sender] != uint(-1)) {\n            require(allowance[src][msg.sender] >= wad);\n            allowance[src][msg.sender] -= wad;\n        }\n\n        balanceOf[src] -= wad;\n        balanceOf[dst] += wad;\n\n        Transfer(src, dst, wad);\n\n        return true;\n    }\n}\n\n\n/*\n                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<http://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<http://www.gnu.org/philosophy/why-not-lgpl.html>.\n\n*/\n",
        "utils/LibBytes/LibBytes.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\n\nlibrary LibBytes {\n\n    using LibBytes for bytes;\n\n    /// @dev Gets the memory address for a byte array.\n    /// @param input Byte array to lookup.\n    /// @return memoryAddress Memory address of byte array. This\n    ///         points to the header of the byte array which contains\n    ///         the length.\n    function rawAddress(bytes memory input)\n        internal\n        pure\n        returns (uint256 memoryAddress)\n    {\n        assembly {\n            memoryAddress := input\n        }\n        return memoryAddress;\n    }\n    \n    /// @dev Gets the memory address for the contents of a byte array.\n    /// @param input Byte array to lookup.\n    /// @return memoryAddress Memory address of the contents of the byte array.\n    function contentAddress(bytes memory input)\n        internal\n        pure\n        returns (uint256 memoryAddress)\n    {\n        assembly {\n            memoryAddress := add(input, 32)\n        }\n        return memoryAddress;\n    }\n\n    /// @dev Copies `length` bytes from memory location `source` to `dest`.\n    /// @param dest memory address to copy bytes to.\n    /// @param source memory address to copy bytes from.\n    /// @param length number of bytes to copy.\n    function memCopy(\n        uint256 dest,\n        uint256 source,\n        uint256 length\n    )\n        internal\n        pure\n    {\n        if (length < 32) {\n            // Handle a partial word by reading destination and masking\n            // off the bits we are interested in.\n            // This correctly handles overlap, zero lengths and source == dest\n            assembly {\n                let mask := sub(exp(256, sub(32, length)), 1)\n                let s := and(mload(source), not(mask))\n                let d := and(mload(dest), mask)\n                mstore(dest, or(s, d))\n            }\n        } else {\n            // Skip the O(length) loop when source == dest.\n            if (source == dest) {\n                return;\n            }\n\n            // For large copies we copy whole words at a time. The final\n            // word is aligned to the end of the range (instead of after the\n            // previous) to handle partial words. So a copy will look like this:\n            //\n            //  ####\n            //      ####\n            //          ####\n            //            ####\n            //\n            // We handle overlap in the source and destination range by\n            // changing the copying direction. This prevents us from\n            // overwriting parts of source that we still need to copy.\n            //\n            // This correctly handles source == dest\n            //\n            if (source > dest) {\n                assembly {\n                    // We subtract 32 from `sEnd` and `dEnd` because it\n                    // is easier to compare with in the loop, and these\n                    // are also the addresses we need for copying the\n                    // last bytes.\n                    length := sub(length, 32)\n                    let sEnd := add(source, length)\n                    let dEnd := add(dest, length)\n\n                    // Remember the last 32 bytes of source\n                    // This needs to be done here and not after the loop\n                    // because we may have overwritten the last bytes in\n                    // source already due to overlap.\n                    let last := mload(sEnd)\n\n                    // Copy whole words front to back\n                    // Note: the first check is always true,\n                    // this could have been a do-while loop.\n                    // solhint-disable-next-line no-empty-blocks\n                    for {} lt(source, sEnd) {} {\n                        mstore(dest, mload(source))\n                        source := add(source, 32)\n                        dest := add(dest, 32)\n                    }\n                    \n                    // Write the last 32 bytes\n                    mstore(dEnd, last)\n                }\n            } else {\n                assembly {\n                    // We subtract 32 from `sEnd` and `dEnd` because those\n                    // are the starting points when copying a word at the end.\n                    length := sub(length, 32)\n                    let sEnd := add(source, length)\n                    let dEnd := add(dest, length)\n\n                    // Remember the first 32 bytes of source\n                    // This needs to be done here and not after the loop\n                    // because we may have overwritten the first bytes in\n                    // source already due to overlap.\n                    let first := mload(source)\n\n                    // Copy whole words back to front\n                    // We use a signed comparisson here to allow dEnd to become\n                    // negative (happens when source and dest < 32). Valid\n                    // addresses in local memory will never be larger than\n                    // 2**255, so they can be safely re-interpreted as signed.\n                    // Note: the first check is always true,\n                    // this could have been a do-while loop.\n                    // solhint-disable-next-line no-empty-blocks\n                    for {} slt(dest, dEnd) {} {\n                        mstore(dEnd, mload(sEnd))\n                        sEnd := sub(sEnd, 32)\n                        dEnd := sub(dEnd, 32)\n                    }\n                    \n                    // Write the first 32 bytes\n                    mstore(dest, first)\n                }\n            }\n        }\n    }\n\n    /// @dev Returns a slices from a byte array.\n    /// @param b The byte array to take a slice from.\n    /// @param from The starting index for the slice (inclusive).\n    /// @param to The final index for the slice (exclusive).\n    /// @return result The slice containing bytes at indices [from, to)\n    function slice(\n        bytes memory b,\n        uint256 from,\n        uint256 to\n    )\n        internal\n        pure\n        returns (bytes memory result)\n    {\n        require(\n            from <= to,\n            \"FROM_LESS_THAN_TO_REQUIRED\"\n        );\n        require(\n            to < b.length,\n            \"TO_LESS_THAN_LENGTH_REQUIRED\"\n        );\n        \n        // Create a new bytes structure and copy contents\n        result = new bytes(to - from);\n        memCopy(\n            result.contentAddress(),\n            b.contentAddress() + from,\n            result.length\n        );\n        return result;\n    }\n    \n    /// @dev Returns a slice from a byte array without preserving the input.\n    /// @param b The byte array to take a slice from. Will be destroyed in the process.\n    /// @param from The starting index for the slice (inclusive).\n    /// @param to The final index for the slice (exclusive).\n    /// @return result The slice containing bytes at indices [from, to)\n    /// @dev When `from == 0`, the original array will match the slice. In other cases its state will be corrupted.\n    function sliceDestructive(\n        bytes memory b,\n        uint256 from,\n        uint256 to\n    )\n        internal\n        pure\n        returns (bytes memory result)\n    {\n        require(\n            from <= to,\n            \"FROM_LESS_THAN_TO_REQUIRED\"\n        );\n        require(\n            to < b.length,\n            \"TO_LESS_THAN_LENGTH_REQUIRED\"\n        );\n        \n        // Create a new bytes structure around [from, to) in-place.\n        assembly {\n            result := add(b, from)\n            mstore(result, sub(to, from))\n        }\n        return result;\n    }\n\n    /// @dev Pops the last byte off of a byte array by modifying its length.\n    /// @param b Byte array that will be modified.\n    /// @return The byte that was popped off.\n    function popLastByte(bytes memory b)\n        internal\n        pure\n        returns (bytes1 result)\n    {\n        require(\n            b.length > 0,\n            \"GREATER_THAN_ZERO_LENGTH_REQUIRED\"\n        );\n\n        // Store last byte.\n        result = b[b.length - 1];\n\n        assembly {\n            // Decrement length of byte array.\n            let newLen := sub(mload(b), 1)\n            mstore(b, newLen)\n        }\n        return result;\n    }\n\n    /// @dev Pops the last 20 bytes off of a byte array by modifying its length.\n    /// @param b Byte array that will be modified.\n    /// @return The 20 byte address that was popped off.\n    function popLast20Bytes(bytes memory b)\n        internal\n        pure\n        returns (address result)\n    {\n        require(\n            b.length >= 20,\n            \"GREATER_OR_EQUAL_TO_20_LENGTH_REQUIRED\"\n        );\n\n        // Store last 20 bytes.\n        result = readAddress(b, b.length - 20);\n\n        assembly {\n            // Subtract 20 from byte array length.\n            let newLen := sub(mload(b), 20)\n            mstore(b, newLen)\n        }\n        return result;\n    }\n\n    /// @dev Tests equality of two byte arrays.\n    /// @param lhs First byte array to compare.\n    /// @param rhs Second byte array to compare.\n    /// @return True if arrays are the same. False otherwise.\n    function equals(\n        bytes memory lhs,\n        bytes memory rhs\n    )\n        internal\n        pure\n        returns (bool equal)\n    {\n        // Keccak gas cost is 30 + numWords * 6. This is a cheap way to compare.\n        // We early exit on unequal lengths, but keccak would also correctly\n        // handle this.\n        return lhs.length == rhs.length && keccak256(lhs) == keccak256(rhs);\n    }\n\n    /// @dev Reads an address from a position in a byte array.\n    /// @param b Byte array containing an address.\n    /// @param index Index in byte array of address.\n    /// @return address from byte array.\n    function readAddress(\n        bytes memory b,\n        uint256 index\n    )\n        internal\n        pure\n        returns (address result)\n    {\n        require(\n            b.length >= index + 20,  // 20 is length of address\n            \"GREATER_OR_EQUAL_TO_20_LENGTH_REQUIRED\"\n        );\n\n        // Add offset to index:\n        // 1. Arrays are prefixed by 32-byte length parameter (add 32 to index)\n        // 2. Account for size difference between address length and 32-byte storage word (subtract 12 from index)\n        index += 20;\n\n        // Read address from array memory\n        assembly {\n            // 1. Add index to address of bytes array\n            // 2. Load 32-byte word from memory\n            // 3. Apply 20-byte mask to obtain address\n            result := and(mload(add(b, index)), 0xffffffffffffffffffffffffffffffffffffffff)\n        }\n        return result;\n    }\n\n    /// @dev Writes an address into a specific position in a byte array.\n    /// @param b Byte array to insert address into.\n    /// @param index Index in byte array of address.\n    /// @param input Address to put into byte array.\n    function writeAddress(\n        bytes memory b,\n        uint256 index,\n        address input\n    )\n        internal\n        pure\n    {\n        require(\n            b.length >= index + 20,  // 20 is length of address\n            \"GREATER_OR_EQUAL_TO_20_LENGTH_REQUIRED\"\n        );\n\n        // Add offset to index:\n        // 1. Arrays are prefixed by 32-byte length parameter (add 32 to index)\n        // 2. Account for size difference between address length and 32-byte storage word (subtract 12 from index)\n        index += 20;\n\n        // Store address into array memory\n        assembly {\n            // The address occupies 20 bytes and mstore stores 32 bytes.\n            // First fetch the 32-byte word where we'll be storing the address, then\n            // apply a mask so we have only the bytes in the word that the address will not occupy.\n            // Then combine these bytes with the address and store the 32 bytes back to memory with mstore.\n\n            // 1. Add index to address of bytes array\n            // 2. Load 32-byte word from memory\n            // 3. Apply 12-byte mask to obtain extra bytes occupying word of memory where we'll store the address\n            let neighbors := and(\n                mload(add(b, index)),\n                0xffffffffffffffffffffffff0000000000000000000000000000000000000000\n            )\n            \n            // Make sure input address is clean.\n            // (Solidity does not guarantee this)\n            input := and(input, 0xffffffffffffffffffffffffffffffffffffffff)\n\n            // Store the neighbors and address into memory\n            mstore(add(b, index), xor(input, neighbors))\n        }\n    }\n\n    /// @dev Reads a bytes32 value from a position in a byte array.\n    /// @param b Byte array containing a bytes32 value.\n    /// @param index Index in byte array of bytes32 value.\n    /// @return bytes32 value from byte array.\n    function readBytes32(\n        bytes memory b,\n        uint256 index\n    )\n        internal\n        pure\n        returns (bytes32 result)\n    {\n        require(\n            b.length >= index + 32,\n            \"GREATER_OR_EQUAL_TO_32_LENGTH_REQUIRED\"\n        );\n\n        // Arrays are prefixed by a 256 bit length parameter\n        index += 32;\n\n        // Read the bytes32 from array memory\n        assembly {\n            result := mload(add(b, index))\n        }\n        return result;\n    }\n\n    /// @dev Writes a bytes32 into a specific position in a byte array.\n    /// @param b Byte array to insert <input> into.\n    /// @param index Index in byte array of <input>.\n    /// @param input bytes32 to put into byte array.\n    function writeBytes32(\n        bytes memory b,\n        uint256 index,\n        bytes32 input\n    )\n        internal\n        pure\n    {\n        require(\n            b.length >= index + 32,\n            \"GREATER_OR_EQUAL_TO_32_LENGTH_REQUIRED\"\n        );\n\n        // Arrays are prefixed by a 256 bit length parameter\n        index += 32;\n\n        // Read the bytes32 from array memory\n        assembly {\n            mstore(add(b, index), input)\n        }\n    }\n\n    /// @dev Reads a uint256 value from a position in a byte array.\n    /// @param b Byte array containing a uint256 value.\n    /// @param index Index in byte array of uint256 value.\n    /// @return uint256 value from byte array.\n    function readUint256(\n        bytes memory b,\n        uint256 index\n    )\n        internal\n        pure\n        returns (uint256 result)\n    {\n        result = uint256(readBytes32(b, index));\n        return result;\n    }\n\n    /// @dev Writes a uint256 into a specific position in a byte array.\n    /// @param b Byte array to insert <input> into.\n    /// @param index Index in byte array of <input>.\n    /// @param input uint256 to put into byte array.\n    function writeUint256(\n        bytes memory b,\n        uint256 index,\n        uint256 input\n    )\n        internal\n        pure\n    {\n        writeBytes32(b, index, bytes32(input));\n    }\n\n    /// @dev Reads an unpadded bytes4 value from a position in a byte array.\n    /// @param b Byte array containing a bytes4 value.\n    /// @param index Index in byte array of bytes4 value.\n    /// @return bytes4 value from byte array.\n    function readBytes4(\n        bytes memory b,\n        uint256 index\n    )\n        internal\n        pure\n        returns (bytes4 result)\n    {\n        require(\n            b.length >= index + 4,\n            \"GREATER_OR_EQUAL_TO_4_LENGTH_REQUIRED\"\n        );\n\n        // Arrays are prefixed by a 32 byte length field\n        index += 32;\n\n        // Read the bytes4 from array memory\n        assembly {\n            result := mload(add(b, index))\n            // Solidity does not require us to clean the trailing bytes.\n            // We do it anyway\n            result := and(result, 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000)\n        }\n        return result;\n    }\n\n    /// @dev Reads nested bytes from a specific position.\n    /// @dev NOTE: the returned value overlaps with the input value.\n    ///            Both should be treated as immutable.\n    /// @param b Byte array containing nested bytes.\n    /// @param index Index of nested bytes.\n    /// @return result Nested bytes.\n    function readBytesWithLength(\n        bytes memory b,\n        uint256 index\n    )\n        internal\n        pure\n        returns (bytes memory result)\n    {\n        // Read length of nested bytes\n        uint256 nestedBytesLength = readUint256(b, index);\n        index += 32;\n\n        // Assert length of <b> is valid, given\n        // length of nested bytes\n        require(\n            b.length >= index + nestedBytesLength,\n            \"GREATER_OR_EQUAL_TO_NESTED_BYTES_LENGTH_REQUIRED\"\n        );\n        \n        // Return a pointer to the byte array as it exists inside `b`\n        assembly {\n            result := add(b, index)\n        }\n        return result;\n    }\n\n    /// @dev Inserts bytes at a specific position in a byte array.\n    /// @param b Byte array to insert <input> into.\n    /// @param index Index in byte array of <input>.\n    /// @param input bytes to insert.\n    function writeBytesWithLength(\n        bytes memory b,\n        uint256 index,\n        bytes memory input\n    )\n        internal\n        pure\n    {\n        // Assert length of <b> is valid, given\n        // length of input\n        require(\n            b.length >= index + 32 + input.length,  // 32 bytes to store length\n            \"GREATER_OR_EQUAL_TO_NESTED_BYTES_LENGTH_REQUIRED\"\n        );\n\n        // Copy <input> into <b>\n        memCopy(\n            b.contentAddress() + index,\n            input.rawAddress(), // includes length of <input>\n            input.length + 32   // +32 bytes to store <input> length\n        );\n    }\n\n    /// @dev Performs a deep copy of a byte array onto another byte array of greater than or equal length.\n    /// @param dest Byte array that will be overwritten with source bytes.\n    /// @param source Byte array to copy onto dest bytes.\n    function deepCopyBytes(\n        bytes memory dest,\n        bytes memory source\n    )\n        internal\n        pure\n    {\n        uint256 sourceLen = source.length;\n        // Dest length must be >= source length, or some bytes would not be copied.\n        require(\n            dest.length >= sourceLen,\n            \"GREATER_OR_EQUAL_TO_SOURCE_BYTES_LENGTH_REQUIRED\"\n        );\n        memCopy(\n            dest.contentAddress(),\n            source.contentAddress(),\n            sourceLen\n        );\n    }\n}\n",
        "utils/Ownable/IOwnable.sol": "pragma solidity 0.4.24;\n\n\ncontract IOwnable {\n\n    function transferOwnership(address newOwner)\n        public;\n}\n",
        "utils/Ownable/Ownable.sol": "pragma solidity 0.4.24;\n\nimport \"./IOwnable.sol\";\n\n\ncontract Ownable is\n    IOwnable\n{\n    address public owner;\n\n    constructor ()\n        public\n    {\n        owner = msg.sender;\n    }\n\n    modifier onlyOwner() {\n        require(\n            msg.sender == owner,\n            \"ONLY_CONTRACT_OWNER\"\n        );\n        _;\n    }\n\n    function transferOwnership(address newOwner)\n        public\n        onlyOwner\n    {\n        if (newOwner != address(0)) {\n            owner = newOwner;\n        }\n    }\n}\n",
        "utils/ReentrancyGuard/ReentrancyGuard.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\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\npragma solidity 0.4.24;\n\n\ncontract ReentrancyGuard {\n\n    // Locked state of mutex\n    bool private locked = false;\n\n    /// @dev Functions with this modifer cannot be reentered. The mutex will be locked\n    ///      before function execution and unlocked after.\n    modifier nonReentrant() {\n        // Ensure mutex is unlocked\n        require(\n            !locked,\n            \"REENTRANCY_ILLEGAL\"\n        );\n\n        // Lock mutex before function call\n        locked = true;\n\n        // Perform function call\n        _;\n\n        // Unlock mutex after function call\n        locked = false;\n    }\n}\n",
        "utils/SafeMath/SafeMath.sol": "pragma solidity 0.4.24;\n\n\ncontract SafeMath {\n\n    function safeMul(uint256 a, uint256 b)\n        internal\n        pure\n        returns (uint256)\n    {\n        if (a == 0) {\n            return 0;\n        }\n        uint256 c = a * b;\n        require(\n            c / a == b,\n            \"UINT256_OVERFLOW\"\n        );\n        return c;\n    }\n\n    function safeDiv(uint256 a, uint256 b)\n        internal\n        pure\n        returns (uint256)\n    {\n        uint256 c = a / b;\n        return c;\n    }\n\n    function safeSub(uint256 a, uint256 b)\n        internal\n        pure\n        returns (uint256)\n    {\n        require(\n            b <= a,\n            \"UINT256_UNDERFLOW\"\n        );\n        return a - b;\n    }\n\n    function safeAdd(uint256 a, uint256 b)\n        internal\n        pure\n        returns (uint256)\n    {\n        uint256 c = a + b;\n        require(\n            c >= a,\n            \"UINT256_OVERFLOW\"\n        );\n        return c;\n    }\n\n    function max64(uint64 a, uint64 b)\n        internal\n        pure\n        returns (uint256)\n    {\n        return a >= b ? a : b;\n    }\n\n    function min64(uint64 a, uint64 b)\n        internal\n        pure\n        returns (uint256)\n    {\n        return a < b ? a : b;\n    }\n\n    function max256(uint256 a, uint256 b)\n        internal\n        pure\n        returns (uint256)\n    {\n        return a >= b ? a : b;\n    }\n\n    function min256(uint256 a, uint256 b)\n        internal\n        pure\n        returns (uint256)\n    {\n        return a < b ? a : b;\n    }\n}\n"
    },
    "sourceTreeHashHex": "0xe122976ffe33df38d409d2f249e6d0a1816704035f2cdc0bbf822d1b28a62259",
    "compiler": {
        "name": "solc",
        "version": "soljson-v0.4.24+commit.e67f0147.js",
        "settings": {
            "optimizer": {
                "enabled": true,
                "runs": 1000000
            },
            "outputSelection": {
                "*": {
                    "*": [
                        "abi",
                        "evm.bytecode.object",
                        "evm.bytecode.sourceMap",
                        "evm.deployedBytecode.object",
                        "evm.deployedBytecode.sourceMap"
                    ]
                }
            }
        }
    },
    "networks": {}
}