-
Notifications
You must be signed in to change notification settings - Fork 0
/
quipuswap_maker_ceiling.tz
1085 lines (1085 loc) · 194 KB
/
quipuswap_maker_ceiling.tz
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
parameter (or (or (or (or (unit %pause) (nat %redeemCallback)) (or (unit %returnBalance) (address %setGovernorContract))) (or (or (nat %setMaxDataDelaySec) (nat %setMinTradeDelaySec)) (or (address %setPauseGuardianContract) (address %setQuipuswapContract)))) (or (or (or (address %setReceiverContract) (address %setSpotContract)) (or (nat %setSpreadAmount) (nat %setTradeAmount))) (or (or (nat %setVolatilityTolerance) (address %setVwapContract)) (or (unit %tokenToTezPayment) (unit %unpause)))));
storage (pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))));
code
{
UNPAIR; # @parameter : @storage
IF_LEFT
{
IF_LEFT
{
IF_LEFT
{
IF_LEFT
{
DROP; # @storage
# == pause == # @storage
AMOUNT; # @amount : @storage
PUSH mutez 0; # mutez : @amount : @storage
COMPARE; # int : @storage
EQ; # bool : @storage
IF
{}
{
AMOUNT; # @amount : @storage
FAILWITH; # FAILED
}; # @storage
# sp.verify(sp.sender == self.data.pauseGuardianContractAddress, 3) # @storage
DUP; # @storage : @storage
CAR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @storage
GET 3; # pair (address %pauseGuardianContractAddress) (bool %paused) : @storage
CAR; # address : @storage
SENDER; # @sender : address : @storage
COMPARE; # int : @storage
EQ; # bool : @storage
IF
{}
{
PUSH int 3; # int : @storage
FAILWITH; # FAILED
}; # @storage
# self.data.paused = True # @storage
UNPAIR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
UNPAIR; # pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
SWAP; # pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
UNPAIR; # pair (address %pauseGuardianContractAddress) (bool %paused) : pair (address %quipuswapContractAddress) (address %receiverContractAddress) : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
CAR; # address : pair (address %quipuswapContractAddress) (address %receiverContractAddress) : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PUSH bool True; # bool : address : pair (address %quipuswapContractAddress) (address %receiverContractAddress) : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
SWAP; # address : bool : pair (address %quipuswapContractAddress) (address %receiverContractAddress) : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair address bool : pair (address %quipuswapContractAddress) (address %receiverContractAddress) : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair (pair address bool) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
SWAP; # pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair address bool) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair address bool) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair address bool) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
NIL operation; # list operation : pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair address bool) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
}
{
# == redeemCallback == # @parameter%redeemCallback : @storage
AMOUNT; # @amount : @parameter%redeemCallback : @storage
PUSH mutez 0; # mutez : @amount : @parameter%redeemCallback : @storage
COMPARE; # int : @parameter%redeemCallback : @storage
EQ; # bool : @parameter%redeemCallback : @storage
IF
{}
{
AMOUNT; # @amount : @parameter%redeemCallback : @storage
FAILWITH; # FAILED
}; # @parameter%redeemCallback : @storage
SWAP; # @storage : @parameter%redeemCallback
# sp.verify(sp.sender == self.data.tokenAddress, 10) # @storage : @parameter%redeemCallback
DUP; # @storage : @storage : @parameter%redeemCallback
DUG 2; # @storage : @parameter%redeemCallback : @storage
GET 3; # pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress)) : @parameter%redeemCallback : @storage
GET 4; # address : @parameter%redeemCallback : @storage
SENDER; # @sender : address : @parameter%redeemCallback : @storage
COMPARE; # int : @parameter%redeemCallback : @storage
EQ; # bool : @parameter%redeemCallback : @storage
IF
{}
{
PUSH int 10; # int : @parameter%redeemCallback : @storage
FAILWITH; # FAILED
}; # @parameter%redeemCallback : @storage
# sp.verify(self.data.state == 1, 14) # @parameter%redeemCallback : @storage
PUSH int 1; # int : @parameter%redeemCallback : @storage
DUP 3; # @storage : int : @parameter%redeemCallback : @storage
GET 3; # pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress)) : int : @parameter%redeemCallback : @storage
GET 3; # int : int : @parameter%redeemCallback : @storage
COMPARE; # int : @parameter%redeemCallback : @storage
EQ; # bool : @parameter%redeemCallback : @storage
IF
{}
{
PUSH int 14; # int : @parameter%redeemCallback : @storage
FAILWITH; # FAILED
}; # @parameter%redeemCallback : @storage
SWAP; # @storage : @parameter%redeemCallback
# self.data.tokenBalance = params # @storage : @parameter%redeemCallback
UNPAIR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%redeemCallback
SWAP; # pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%redeemCallback
UNPAIR; # pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress)) : pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%redeemCallback
SWAP; # pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%redeemCallback
UNPAIR; # pair (nat %tokenBalance) (nat %tradeAmount) : pair (nat %volatilityTolerance) (address %vwapContractAddress) : pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%redeemCallback
CDR; # nat : pair (nat %volatilityTolerance) (address %vwapContractAddress) : pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%redeemCallback
DIG 4; # @parameter%redeemCallback : nat : pair (nat %volatilityTolerance) (address %vwapContractAddress) : pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))
PAIR; # pair @parameter%redeemCallback nat : pair (nat %volatilityTolerance) (address %vwapContractAddress) : pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))
PAIR; # pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))
SWAP; # pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress)) : pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))
PAIR; # pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))
SWAP; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
# sp.transfer((sp.self_address, self.data.receiverContractAddress, self.data.tokenBalance), sp.tez(0), sp.contract(sp.TTuple(sp.TAddress, sp.TAddress, sp.TNat), self.data.tokenAddress, entry_point='transfer').open_some()) # pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
DUP; # pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))) : pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
GET 3; # pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress)) : pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
GET 4; # address : pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
CONTRACT %transfer (pair address (pair address nat)); # option (contract (pair address (pair address nat))) : pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
IF_NONE
{
PUSH int 226; # int : pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
FAILWITH; # FAILED
}
{}; # @some : pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
NIL operation; # list operation : @some : pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
SWAP; # @some : list operation : pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
PUSH mutez 0; # mutez : @some : list operation : pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
DIG 3; # pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))) : mutez : @some : list operation
DUP; # pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))) : pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))) : mutez : @some : list operation
GET 5; # pair @parameter%redeemCallback nat : pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))) : mutez : @some : list operation
CAR; # @parameter%redeemCallback : pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))) : mutez : @some : list operation
SWAP; # pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))) : @parameter%redeemCallback : mutez : @some : list operation
DUP; # pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))) : pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))) : @parameter%redeemCallback : mutez : @some : list operation
DUG 5; # pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))) : @parameter%redeemCallback : mutez : @some : list operation : pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
CAR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%redeemCallback : mutez : @some : list operation : pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
GET 6; # address : @parameter%redeemCallback : mutez : @some : list operation : pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
PAIR; # pair address @parameter%redeemCallback : mutez : @some : list operation : pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
SELF_ADDRESS; # @self : pair address @parameter%redeemCallback : mutez : @some : list operation : pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
PAIR; # pair @self (pair address @parameter%redeemCallback) : mutez : @some : list operation : pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
TRANSFER_TOKENS; # operation : list operation : pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
CONS; # list operation : pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
SWAP; # pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))) : list operation
# self.data.state = 0 # pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))) : list operation
UNPAIR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : list operation
SWAP; # pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : list operation
UNPAIR; # pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress)) : pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : list operation
UNPAIR; # pair (address %spotContractAddress) (nat %spreadAmount) : pair (int %state) (address %tokenAddress) : pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : list operation
SWAP; # pair (int %state) (address %tokenAddress) : pair (address %spotContractAddress) (nat %spreadAmount) : pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : list operation
CDR; # address : pair (address %spotContractAddress) (nat %spreadAmount) : pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : list operation
PUSH int 0; # int : address : pair (address %spotContractAddress) (nat %spreadAmount) : pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : list operation
PAIR; # pair int address : pair (address %spotContractAddress) (nat %spreadAmount) : pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : list operation
SWAP; # pair (address %spotContractAddress) (nat %spreadAmount) : pair int address : pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : list operation
PAIR; # pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair int address) : pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : list operation
PAIR; # pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair int address)) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : list operation
SWAP; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair int address)) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : list operation
PAIR; # pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair int address)) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))) : list operation
SWAP; # list operation : pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair int address)) (pair (pair @parameter%redeemCallback nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
}; # list operation : pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair address bool) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair int address)) (pair (pair nat nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
}
{
IF_LEFT
{
DROP; # @storage
# == returnBalance == # @storage
AMOUNT; # @amount : @storage
PUSH mutez 0; # mutez : @amount : @storage
COMPARE; # int : @storage
EQ; # bool : @storage
IF
{}
{
AMOUNT; # @amount : @storage
FAILWITH; # FAILED
}; # @storage
# sp.verify(sp.sender == self.data.governorContractAddress, 1) # @storage
DUP; # @storage : @storage
CAR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @storage
CAR; # pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : @storage
CAR; # pair (address %governorContractAddress) (timestamp %lastTradeTime) : @storage
CAR; # address : @storage
SENDER; # @sender : address : @storage
COMPARE; # int : @storage
EQ; # bool : @storage
IF
{}
{
PUSH int 1; # int : @storage
FAILWITH; # FAILED
}; # @storage
# sp.verify(self.data.state == 0, 14) # @storage
DUP; # @storage : @storage
GET 3; # pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress)) : @storage
GET 3; # int : @storage
PUSH int 0; # int : int : @storage
COMPARE; # int : @storage
EQ; # bool : @storage
IF
{}
{
PUSH int 14; # int : @storage
FAILWITH; # FAILED
}; # @storage
# sp.transfer((sp.self_address, sp.self_entry_point('redeemCallback')), sp.tez(0), sp.contract(sp.TPair(sp.TAddress, sp.TContract(sp.TNat)), self.data.tokenAddress, entry_point='getBalance').open_some()) # @storage
DUP; # @storage : @storage
GET 3; # pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress)) : @storage
GET 4; # address : @storage
CONTRACT %getBalance (pair address (contract nat)); # option (contract (pair address (contract nat))) : @storage
IF_NONE
{
PUSH int 196; # int : @storage
FAILWITH; # FAILED
}
{}; # @some : @storage
NIL operation; # list operation : @some : @storage
SWAP; # @some : list operation : @storage
PUSH mutez 0; # mutez : @some : list operation : @storage
SELF %redeemCallback; # @self : mutez : @some : list operation : @storage
SELF_ADDRESS; # @self : @self : mutez : @some : list operation : @storage
PAIR; # pair @self @self : mutez : @some : list operation : @storage
TRANSFER_TOKENS; # operation : list operation : @storage
CONS; # list operation : @storage
SWAP; # @storage : list operation
# self.data.state = 1 # @storage : list operation
UNPAIR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : list operation
SWAP; # pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : list operation
UNPAIR; # pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress)) : pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : list operation
UNPAIR; # pair (address %spotContractAddress) (nat %spreadAmount) : pair (int %state) (address %tokenAddress) : pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : list operation
SWAP; # pair (int %state) (address %tokenAddress) : pair (address %spotContractAddress) (nat %spreadAmount) : pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : list operation
CDR; # address : pair (address %spotContractAddress) (nat %spreadAmount) : pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : list operation
PUSH int 1; # int : address : pair (address %spotContractAddress) (nat %spreadAmount) : pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : list operation
PAIR; # pair int address : pair (address %spotContractAddress) (nat %spreadAmount) : pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : list operation
SWAP; # pair (address %spotContractAddress) (nat %spreadAmount) : pair int address : pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : list operation
PAIR; # pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair int address) : pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : list operation
PAIR; # pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair int address)) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : list operation
SWAP; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair int address)) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : list operation
PAIR; # pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair int address)) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))) : list operation
SWAP; # list operation : pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair int address)) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
}
{
# == setGovernorContract == # @parameter%setGovernorContract : @storage
AMOUNT; # @amount : @parameter%setGovernorContract : @storage
PUSH mutez 0; # mutez : @amount : @parameter%setGovernorContract : @storage
COMPARE; # int : @parameter%setGovernorContract : @storage
EQ; # bool : @parameter%setGovernorContract : @storage
IF
{}
{
AMOUNT; # @amount : @parameter%setGovernorContract : @storage
FAILWITH; # FAILED
}; # @parameter%setGovernorContract : @storage
SWAP; # @storage : @parameter%setGovernorContract
# sp.verify(sp.sender == self.data.governorContractAddress, 1) # @storage : @parameter%setGovernorContract
DUP; # @storage : @storage : @parameter%setGovernorContract
DUG 2; # @storage : @parameter%setGovernorContract : @storage
CAR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%setGovernorContract : @storage
CAR; # pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : @parameter%setGovernorContract : @storage
CAR; # pair (address %governorContractAddress) (timestamp %lastTradeTime) : @parameter%setGovernorContract : @storage
CAR; # address : @parameter%setGovernorContract : @storage
SENDER; # @sender : address : @parameter%setGovernorContract : @storage
COMPARE; # int : @parameter%setGovernorContract : @storage
EQ; # bool : @parameter%setGovernorContract : @storage
IF
{}
{
PUSH int 1; # int : @parameter%setGovernorContract : @storage
FAILWITH; # FAILED
}; # @parameter%setGovernorContract : @storage
SWAP; # @storage : @parameter%setGovernorContract
# self.data.governorContractAddress = params # @storage : @parameter%setGovernorContract
UNPAIR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setGovernorContract
UNPAIR; # pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setGovernorContract
UNPAIR; # pair (address %governorContractAddress) (timestamp %lastTradeTime) : pair (nat %maxDataDelaySec) (nat %minTradeDelaySec) : pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setGovernorContract
CDR; # timestamp : pair (nat %maxDataDelaySec) (nat %minTradeDelaySec) : pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setGovernorContract
DIG 4; # @parameter%setGovernorContract : timestamp : pair (nat %maxDataDelaySec) (nat %minTradeDelaySec) : pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair @parameter%setGovernorContract timestamp : pair (nat %maxDataDelaySec) (nat %minTradeDelaySec) : pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair (pair @parameter%setGovernorContract timestamp) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair (pair (pair @parameter%setGovernorContract timestamp) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair (pair (pair (pair @parameter%setGovernorContract timestamp) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
NIL operation; # list operation : pair (pair (pair (pair @parameter%setGovernorContract timestamp) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
}; # list operation : pair (pair (pair (pair address timestamp) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair int address)) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
}; # list operation : pair (pair (pair (pair address timestamp) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair address bool) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair int address)) (pair (pair nat nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
}
{
IF_LEFT
{
IF_LEFT
{
# == setMaxDataDelaySec == # @parameter%setMaxDataDelaySec : @storage
AMOUNT; # @amount : @parameter%setMaxDataDelaySec : @storage
PUSH mutez 0; # mutez : @amount : @parameter%setMaxDataDelaySec : @storage
COMPARE; # int : @parameter%setMaxDataDelaySec : @storage
EQ; # bool : @parameter%setMaxDataDelaySec : @storage
IF
{}
{
AMOUNT; # @amount : @parameter%setMaxDataDelaySec : @storage
FAILWITH; # FAILED
}; # @parameter%setMaxDataDelaySec : @storage
SWAP; # @storage : @parameter%setMaxDataDelaySec
# sp.verify(sp.sender == self.data.governorContractAddress, 1) # @storage : @parameter%setMaxDataDelaySec
DUP; # @storage : @storage : @parameter%setMaxDataDelaySec
DUG 2; # @storage : @parameter%setMaxDataDelaySec : @storage
CAR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%setMaxDataDelaySec : @storage
CAR; # pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : @parameter%setMaxDataDelaySec : @storage
CAR; # pair (address %governorContractAddress) (timestamp %lastTradeTime) : @parameter%setMaxDataDelaySec : @storage
CAR; # address : @parameter%setMaxDataDelaySec : @storage
SENDER; # @sender : address : @parameter%setMaxDataDelaySec : @storage
COMPARE; # int : @parameter%setMaxDataDelaySec : @storage
EQ; # bool : @parameter%setMaxDataDelaySec : @storage
IF
{}
{
PUSH int 1; # int : @parameter%setMaxDataDelaySec : @storage
FAILWITH; # FAILED
}; # @parameter%setMaxDataDelaySec : @storage
SWAP; # @storage : @parameter%setMaxDataDelaySec
# self.data.maxDataDelaySec = params # @storage : @parameter%setMaxDataDelaySec
UNPAIR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setMaxDataDelaySec
UNPAIR; # pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setMaxDataDelaySec
UNPAIR; # pair (address %governorContractAddress) (timestamp %lastTradeTime) : pair (nat %maxDataDelaySec) (nat %minTradeDelaySec) : pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setMaxDataDelaySec
SWAP; # pair (nat %maxDataDelaySec) (nat %minTradeDelaySec) : pair (address %governorContractAddress) (timestamp %lastTradeTime) : pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setMaxDataDelaySec
CDR; # nat : pair (address %governorContractAddress) (timestamp %lastTradeTime) : pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setMaxDataDelaySec
DIG 4; # @parameter%setMaxDataDelaySec : nat : pair (address %governorContractAddress) (timestamp %lastTradeTime) : pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair @parameter%setMaxDataDelaySec nat : pair (address %governorContractAddress) (timestamp %lastTradeTime) : pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
SWAP; # pair (address %governorContractAddress) (timestamp %lastTradeTime) : pair @parameter%setMaxDataDelaySec nat : pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair @parameter%setMaxDataDelaySec nat) : pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair @parameter%setMaxDataDelaySec nat)) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair @parameter%setMaxDataDelaySec nat)) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
}
{
# == setMinTradeDelaySec == # @parameter%setMinTradeDelaySec : @storage
AMOUNT; # @amount : @parameter%setMinTradeDelaySec : @storage
PUSH mutez 0; # mutez : @amount : @parameter%setMinTradeDelaySec : @storage
COMPARE; # int : @parameter%setMinTradeDelaySec : @storage
EQ; # bool : @parameter%setMinTradeDelaySec : @storage
IF
{}
{
AMOUNT; # @amount : @parameter%setMinTradeDelaySec : @storage
FAILWITH; # FAILED
}; # @parameter%setMinTradeDelaySec : @storage
SWAP; # @storage : @parameter%setMinTradeDelaySec
# sp.verify(sp.sender == self.data.governorContractAddress, 1) # @storage : @parameter%setMinTradeDelaySec
DUP; # @storage : @storage : @parameter%setMinTradeDelaySec
DUG 2; # @storage : @parameter%setMinTradeDelaySec : @storage
CAR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%setMinTradeDelaySec : @storage
CAR; # pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : @parameter%setMinTradeDelaySec : @storage
CAR; # pair (address %governorContractAddress) (timestamp %lastTradeTime) : @parameter%setMinTradeDelaySec : @storage
CAR; # address : @parameter%setMinTradeDelaySec : @storage
SENDER; # @sender : address : @parameter%setMinTradeDelaySec : @storage
COMPARE; # int : @parameter%setMinTradeDelaySec : @storage
EQ; # bool : @parameter%setMinTradeDelaySec : @storage
IF
{}
{
PUSH int 1; # int : @parameter%setMinTradeDelaySec : @storage
FAILWITH; # FAILED
}; # @parameter%setMinTradeDelaySec : @storage
SWAP; # @storage : @parameter%setMinTradeDelaySec
# self.data.minTradeDelaySec = params # @storage : @parameter%setMinTradeDelaySec
UNPAIR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setMinTradeDelaySec
UNPAIR; # pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setMinTradeDelaySec
UNPAIR; # pair (address %governorContractAddress) (timestamp %lastTradeTime) : pair (nat %maxDataDelaySec) (nat %minTradeDelaySec) : pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setMinTradeDelaySec
SWAP; # pair (nat %maxDataDelaySec) (nat %minTradeDelaySec) : pair (address %governorContractAddress) (timestamp %lastTradeTime) : pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setMinTradeDelaySec
CAR; # nat : pair (address %governorContractAddress) (timestamp %lastTradeTime) : pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setMinTradeDelaySec
DIG 4; # @parameter%setMinTradeDelaySec : nat : pair (address %governorContractAddress) (timestamp %lastTradeTime) : pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
SWAP; # nat : @parameter%setMinTradeDelaySec : pair (address %governorContractAddress) (timestamp %lastTradeTime) : pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair nat @parameter%setMinTradeDelaySec : pair (address %governorContractAddress) (timestamp %lastTradeTime) : pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
SWAP; # pair (address %governorContractAddress) (timestamp %lastTradeTime) : pair nat @parameter%setMinTradeDelaySec : pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair nat @parameter%setMinTradeDelaySec) : pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair nat @parameter%setMinTradeDelaySec)) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair nat @parameter%setMinTradeDelaySec)) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
}; # pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair nat nat)) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
}
{
IF_LEFT
{
# == setPauseGuardianContract == # @parameter%setPauseGuardianContract : @storage
AMOUNT; # @amount : @parameter%setPauseGuardianContract : @storage
PUSH mutez 0; # mutez : @amount : @parameter%setPauseGuardianContract : @storage
COMPARE; # int : @parameter%setPauseGuardianContract : @storage
EQ; # bool : @parameter%setPauseGuardianContract : @storage
IF
{}
{
AMOUNT; # @amount : @parameter%setPauseGuardianContract : @storage
FAILWITH; # FAILED
}; # @parameter%setPauseGuardianContract : @storage
SWAP; # @storage : @parameter%setPauseGuardianContract
# sp.verify(sp.sender == self.data.governorContractAddress, 1) # @storage : @parameter%setPauseGuardianContract
DUP; # @storage : @storage : @parameter%setPauseGuardianContract
DUG 2; # @storage : @parameter%setPauseGuardianContract : @storage
CAR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%setPauseGuardianContract : @storage
CAR; # pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : @parameter%setPauseGuardianContract : @storage
CAR; # pair (address %governorContractAddress) (timestamp %lastTradeTime) : @parameter%setPauseGuardianContract : @storage
CAR; # address : @parameter%setPauseGuardianContract : @storage
SENDER; # @sender : address : @parameter%setPauseGuardianContract : @storage
COMPARE; # int : @parameter%setPauseGuardianContract : @storage
EQ; # bool : @parameter%setPauseGuardianContract : @storage
IF
{}
{
PUSH int 1; # int : @parameter%setPauseGuardianContract : @storage
FAILWITH; # FAILED
}; # @parameter%setPauseGuardianContract : @storage
SWAP; # @storage : @parameter%setPauseGuardianContract
# self.data.pauseGuardianContractAddress = params # @storage : @parameter%setPauseGuardianContract
UNPAIR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setPauseGuardianContract
UNPAIR; # pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setPauseGuardianContract
SWAP; # pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setPauseGuardianContract
UNPAIR; # pair (address %pauseGuardianContractAddress) (bool %paused) : pair (address %quipuswapContractAddress) (address %receiverContractAddress) : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setPauseGuardianContract
CDR; # bool : pair (address %quipuswapContractAddress) (address %receiverContractAddress) : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setPauseGuardianContract
DIG 4; # @parameter%setPauseGuardianContract : bool : pair (address %quipuswapContractAddress) (address %receiverContractAddress) : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair @parameter%setPauseGuardianContract bool : pair (address %quipuswapContractAddress) (address %receiverContractAddress) : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair (pair @parameter%setPauseGuardianContract bool) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
SWAP; # pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair @parameter%setPauseGuardianContract bool) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair @parameter%setPauseGuardianContract bool) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair @parameter%setPauseGuardianContract bool) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
}
{
# == setQuipuswapContract == # @parameter%setQuipuswapContract : @storage
AMOUNT; # @amount : @parameter%setQuipuswapContract : @storage
PUSH mutez 0; # mutez : @amount : @parameter%setQuipuswapContract : @storage
COMPARE; # int : @parameter%setQuipuswapContract : @storage
EQ; # bool : @parameter%setQuipuswapContract : @storage
IF
{}
{
AMOUNT; # @amount : @parameter%setQuipuswapContract : @storage
FAILWITH; # FAILED
}; # @parameter%setQuipuswapContract : @storage
SWAP; # @storage : @parameter%setQuipuswapContract
# sp.verify(sp.sender == self.data.governorContractAddress, 1) # @storage : @parameter%setQuipuswapContract
DUP; # @storage : @storage : @parameter%setQuipuswapContract
DUG 2; # @storage : @parameter%setQuipuswapContract : @storage
CAR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%setQuipuswapContract : @storage
CAR; # pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : @parameter%setQuipuswapContract : @storage
CAR; # pair (address %governorContractAddress) (timestamp %lastTradeTime) : @parameter%setQuipuswapContract : @storage
CAR; # address : @parameter%setQuipuswapContract : @storage
SENDER; # @sender : address : @parameter%setQuipuswapContract : @storage
COMPARE; # int : @parameter%setQuipuswapContract : @storage
EQ; # bool : @parameter%setQuipuswapContract : @storage
IF
{}
{
PUSH int 1; # int : @parameter%setQuipuswapContract : @storage
FAILWITH; # FAILED
}; # @parameter%setQuipuswapContract : @storage
SWAP; # @storage : @parameter%setQuipuswapContract
# self.data.quipuswapContractAddress = params # @storage : @parameter%setQuipuswapContract
UNPAIR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setQuipuswapContract
UNPAIR; # pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setQuipuswapContract
SWAP; # pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setQuipuswapContract
UNPAIR; # pair (address %pauseGuardianContractAddress) (bool %paused) : pair (address %quipuswapContractAddress) (address %receiverContractAddress) : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setQuipuswapContract
SWAP; # pair (address %quipuswapContractAddress) (address %receiverContractAddress) : pair (address %pauseGuardianContractAddress) (bool %paused) : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setQuipuswapContract
CDR; # address : pair (address %pauseGuardianContractAddress) (bool %paused) : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setQuipuswapContract
DIG 4; # @parameter%setQuipuswapContract : address : pair (address %pauseGuardianContractAddress) (bool %paused) : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair @parameter%setQuipuswapContract address : pair (address %pauseGuardianContractAddress) (bool %paused) : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
SWAP; # pair (address %pauseGuardianContractAddress) (bool %paused) : pair @parameter%setQuipuswapContract address : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair @parameter%setQuipuswapContract address) : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
SWAP; # pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair @parameter%setQuipuswapContract address) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair @parameter%setQuipuswapContract address)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair @parameter%setQuipuswapContract address))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
}; # pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair address bool) (pair address address))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
}; # pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair nat nat)) (pair (pair address bool) (pair address address))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
NIL operation; # list operation : pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair nat nat)) (pair (pair address bool) (pair address address))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
}; # list operation : pair (pair (pair (pair address timestamp) (pair nat nat)) (pair (pair address bool) (pair address address))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair int address)) (pair (pair nat nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
}
{
IF_LEFT
{
IF_LEFT
{
IF_LEFT
{
# == setReceiverContract == # @parameter%setReceiverContract : @storage
AMOUNT; # @amount : @parameter%setReceiverContract : @storage
PUSH mutez 0; # mutez : @amount : @parameter%setReceiverContract : @storage
COMPARE; # int : @parameter%setReceiverContract : @storage
EQ; # bool : @parameter%setReceiverContract : @storage
IF
{}
{
AMOUNT; # @amount : @parameter%setReceiverContract : @storage
FAILWITH; # FAILED
}; # @parameter%setReceiverContract : @storage
SWAP; # @storage : @parameter%setReceiverContract
# sp.verify(sp.sender == self.data.governorContractAddress, 1) # @storage : @parameter%setReceiverContract
DUP; # @storage : @storage : @parameter%setReceiverContract
DUG 2; # @storage : @parameter%setReceiverContract : @storage
CAR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%setReceiverContract : @storage
CAR; # pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : @parameter%setReceiverContract : @storage
CAR; # pair (address %governorContractAddress) (timestamp %lastTradeTime) : @parameter%setReceiverContract : @storage
CAR; # address : @parameter%setReceiverContract : @storage
SENDER; # @sender : address : @parameter%setReceiverContract : @storage
COMPARE; # int : @parameter%setReceiverContract : @storage
EQ; # bool : @parameter%setReceiverContract : @storage
IF
{}
{
PUSH int 1; # int : @parameter%setReceiverContract : @storage
FAILWITH; # FAILED
}; # @parameter%setReceiverContract : @storage
SWAP; # @storage : @parameter%setReceiverContract
# self.data.receiverContractAddress = params # @storage : @parameter%setReceiverContract
UNPAIR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setReceiverContract
UNPAIR; # pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setReceiverContract
SWAP; # pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)) : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setReceiverContract
UNPAIR; # pair (address %pauseGuardianContractAddress) (bool %paused) : pair (address %quipuswapContractAddress) (address %receiverContractAddress) : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setReceiverContract
SWAP; # pair (address %quipuswapContractAddress) (address %receiverContractAddress) : pair (address %pauseGuardianContractAddress) (bool %paused) : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setReceiverContract
CAR; # address : pair (address %pauseGuardianContractAddress) (bool %paused) : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setReceiverContract
DIG 4; # @parameter%setReceiverContract : address : pair (address %pauseGuardianContractAddress) (bool %paused) : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
SWAP; # address : @parameter%setReceiverContract : pair (address %pauseGuardianContractAddress) (bool %paused) : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair address @parameter%setReceiverContract : pair (address %pauseGuardianContractAddress) (bool %paused) : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
SWAP; # pair (address %pauseGuardianContractAddress) (bool %paused) : pair address @parameter%setReceiverContract : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair address @parameter%setReceiverContract) : pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
SWAP; # pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair address @parameter%setReceiverContract) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair address @parameter%setReceiverContract)) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair address @parameter%setReceiverContract))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
}
{
# == setSpotContract == # @parameter%setSpotContract : @storage
AMOUNT; # @amount : @parameter%setSpotContract : @storage
PUSH mutez 0; # mutez : @amount : @parameter%setSpotContract : @storage
COMPARE; # int : @parameter%setSpotContract : @storage
EQ; # bool : @parameter%setSpotContract : @storage
IF
{}
{
AMOUNT; # @amount : @parameter%setSpotContract : @storage
FAILWITH; # FAILED
}; # @parameter%setSpotContract : @storage
SWAP; # @storage : @parameter%setSpotContract
# sp.verify(sp.sender == self.data.governorContractAddress, 1) # @storage : @parameter%setSpotContract
DUP; # @storage : @storage : @parameter%setSpotContract
DUG 2; # @storage : @parameter%setSpotContract : @storage
CAR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%setSpotContract : @storage
CAR; # pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : @parameter%setSpotContract : @storage
CAR; # pair (address %governorContractAddress) (timestamp %lastTradeTime) : @parameter%setSpotContract : @storage
CAR; # address : @parameter%setSpotContract : @storage
SENDER; # @sender : address : @parameter%setSpotContract : @storage
COMPARE; # int : @parameter%setSpotContract : @storage
EQ; # bool : @parameter%setSpotContract : @storage
IF
{}
{
PUSH int 1; # int : @parameter%setSpotContract : @storage
FAILWITH; # FAILED
}; # @parameter%setSpotContract : @storage
SWAP; # @storage : @parameter%setSpotContract
# self.data.spotContractAddress = params # @storage : @parameter%setSpotContract
UNPAIR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setSpotContract
SWAP; # pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%setSpotContract
UNPAIR; # pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress)) : pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%setSpotContract
UNPAIR; # pair (address %spotContractAddress) (nat %spreadAmount) : pair (int %state) (address %tokenAddress) : pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%setSpotContract
CDR; # nat : pair (int %state) (address %tokenAddress) : pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%setSpotContract
DIG 4; # @parameter%setSpotContract : nat : pair (int %state) (address %tokenAddress) : pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))
PAIR; # pair @parameter%setSpotContract nat : pair (int %state) (address %tokenAddress) : pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))
PAIR; # pair (pair @parameter%setSpotContract nat) (pair (int %state) (address %tokenAddress)) : pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))
PAIR; # pair (pair (pair @parameter%setSpotContract nat) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))
SWAP; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : pair (pair (pair @parameter%setSpotContract nat) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair @parameter%setSpotContract nat) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
}; # pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair address address))) (pair (pair (pair address nat) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
}
{
IF_LEFT
{
# == setSpreadAmount == # @parameter%setSpreadAmount : @storage
AMOUNT; # @amount : @parameter%setSpreadAmount : @storage
PUSH mutez 0; # mutez : @amount : @parameter%setSpreadAmount : @storage
COMPARE; # int : @parameter%setSpreadAmount : @storage
EQ; # bool : @parameter%setSpreadAmount : @storage
IF
{}
{
AMOUNT; # @amount : @parameter%setSpreadAmount : @storage
FAILWITH; # FAILED
}; # @parameter%setSpreadAmount : @storage
SWAP; # @storage : @parameter%setSpreadAmount
# sp.verify(sp.sender == self.data.governorContractAddress, 1) # @storage : @parameter%setSpreadAmount
DUP; # @storage : @storage : @parameter%setSpreadAmount
DUG 2; # @storage : @parameter%setSpreadAmount : @storage
CAR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%setSpreadAmount : @storage
CAR; # pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : @parameter%setSpreadAmount : @storage
CAR; # pair (address %governorContractAddress) (timestamp %lastTradeTime) : @parameter%setSpreadAmount : @storage
CAR; # address : @parameter%setSpreadAmount : @storage
SENDER; # @sender : address : @parameter%setSpreadAmount : @storage
COMPARE; # int : @parameter%setSpreadAmount : @storage
EQ; # bool : @parameter%setSpreadAmount : @storage
IF
{}
{
PUSH int 1; # int : @parameter%setSpreadAmount : @storage
FAILWITH; # FAILED
}; # @parameter%setSpreadAmount : @storage
SWAP; # @storage : @parameter%setSpreadAmount
# self.data.spreadAmount = params # @storage : @parameter%setSpreadAmount
UNPAIR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setSpreadAmount
SWAP; # pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%setSpreadAmount
UNPAIR; # pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress)) : pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%setSpreadAmount
UNPAIR; # pair (address %spotContractAddress) (nat %spreadAmount) : pair (int %state) (address %tokenAddress) : pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%setSpreadAmount
CAR; # address : pair (int %state) (address %tokenAddress) : pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%setSpreadAmount
DIG 4; # @parameter%setSpreadAmount : address : pair (int %state) (address %tokenAddress) : pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))
SWAP; # address : @parameter%setSpreadAmount : pair (int %state) (address %tokenAddress) : pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))
PAIR; # pair address @parameter%setSpreadAmount : pair (int %state) (address %tokenAddress) : pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))
PAIR; # pair (pair address @parameter%setSpreadAmount) (pair (int %state) (address %tokenAddress)) : pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))
PAIR; # pair (pair (pair address @parameter%setSpreadAmount) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))
SWAP; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : pair (pair (pair address @parameter%setSpreadAmount) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair address @parameter%setSpreadAmount) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
}
{
# == setTradeAmount == # @parameter%setTradeAmount : @storage
AMOUNT; # @amount : @parameter%setTradeAmount : @storage
PUSH mutez 0; # mutez : @amount : @parameter%setTradeAmount : @storage
COMPARE; # int : @parameter%setTradeAmount : @storage
EQ; # bool : @parameter%setTradeAmount : @storage
IF
{}
{
AMOUNT; # @amount : @parameter%setTradeAmount : @storage
FAILWITH; # FAILED
}; # @parameter%setTradeAmount : @storage
SWAP; # @storage : @parameter%setTradeAmount
# sp.verify(sp.sender == self.data.governorContractAddress, 1) # @storage : @parameter%setTradeAmount
DUP; # @storage : @storage : @parameter%setTradeAmount
DUG 2; # @storage : @parameter%setTradeAmount : @storage
CAR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%setTradeAmount : @storage
CAR; # pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : @parameter%setTradeAmount : @storage
CAR; # pair (address %governorContractAddress) (timestamp %lastTradeTime) : @parameter%setTradeAmount : @storage
CAR; # address : @parameter%setTradeAmount : @storage
SENDER; # @sender : address : @parameter%setTradeAmount : @storage
COMPARE; # int : @parameter%setTradeAmount : @storage
EQ; # bool : @parameter%setTradeAmount : @storage
IF
{}
{
PUSH int 1; # int : @parameter%setTradeAmount : @storage
FAILWITH; # FAILED
}; # @parameter%setTradeAmount : @storage
SWAP; # @storage : @parameter%setTradeAmount
# self.data.tradeAmount = params # @storage : @parameter%setTradeAmount
UNPAIR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : @parameter%setTradeAmount
SWAP; # pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%setTradeAmount
UNPAIR; # pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress)) : pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%setTradeAmount
SWAP; # pair (pair (nat %tokenBalance) (nat %tradeAmount)) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%setTradeAmount
UNPAIR; # pair (nat %tokenBalance) (nat %tradeAmount) : pair (nat %volatilityTolerance) (address %vwapContractAddress) : pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%setTradeAmount
CAR; # nat : pair (nat %volatilityTolerance) (address %vwapContractAddress) : pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%setTradeAmount
DIG 4; # @parameter%setTradeAmount : nat : pair (nat %volatilityTolerance) (address %vwapContractAddress) : pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))
SWAP; # nat : @parameter%setTradeAmount : pair (nat %volatilityTolerance) (address %vwapContractAddress) : pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))
PAIR; # pair nat @parameter%setTradeAmount : pair (nat %volatilityTolerance) (address %vwapContractAddress) : pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))
PAIR; # pair (pair nat @parameter%setTradeAmount) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))
SWAP; # pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress)) : pair (pair nat @parameter%setTradeAmount) (pair (nat %volatilityTolerance) (address %vwapContractAddress)) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))
PAIR; # pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair nat @parameter%setTradeAmount) (pair (nat %volatilityTolerance) (address %vwapContractAddress))) : pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))
SWAP; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair nat @parameter%setTradeAmount) (pair (nat %volatilityTolerance) (address %vwapContractAddress)))
PAIR; # pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress))) (pair (pair nat @parameter%setTradeAmount) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
}; # pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress)))) (pair (pair (pair address nat) (pair (int %state) (address %tokenAddress))) (pair (pair nat nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
}; # pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair address address))) (pair (pair (pair address nat) (pair (int %state) (address %tokenAddress))) (pair (pair nat nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
NIL operation; # list operation : pair (pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair address address))) (pair (pair (pair address nat) (pair (int %state) (address %tokenAddress))) (pair (pair nat nat) (pair (nat %volatilityTolerance) (address %vwapContractAddress))))
}
{
IF_LEFT
{
IF_LEFT
{
# == setVolatilityTolerance == # @parameter%setVolatilityTolerance : @storage
AMOUNT; # @amount : @parameter%setVolatilityTolerance : @storage
PUSH mutez 0; # mutez : @amount : @parameter%setVolatilityTolerance : @storage
COMPARE; # int : @parameter%setVolatilityTolerance : @storage
EQ; # bool : @parameter%setVolatilityTolerance : @storage
IF
{}
{
AMOUNT; # @amount : @parameter%setVolatilityTolerance : @storage
FAILWITH; # FAILED
}; # @parameter%setVolatilityTolerance : @storage
SWAP; # @storage : @parameter%setVolatilityTolerance
# sp.verify(sp.sender == self.data.governorContractAddress, 1) # @storage : @parameter%setVolatilityTolerance
DUP; # @storage : @storage : @parameter%setVolatilityTolerance
DUG 2; # @storage : @parameter%setVolatilityTolerance : @storage
CAR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%setVolatilityTolerance : @storage
CAR; # pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : @parameter%setVolatilityTolerance : @storage
CAR; # pair (address %governorContractAddress) (timestamp %lastTradeTime) : @parameter%setVolatilityTolerance : @storage
CAR; # address : @parameter%setVolatilityTolerance : @storage
SENDER; # @sender : address : @parameter%setVolatilityTolerance : @storage
COMPARE; # int : @parameter%setVolatilityTolerance : @storage
EQ; # bool : @parameter%setVolatilityTolerance : @storage
IF
{}
{
PUSH int 1; # int : @parameter%setVolatilityTolerance : @storage
FAILWITH; # FAILED
}; # @parameter%setVolatilityTolerance : @storage
# self.data.volatilityTolerance = params # @parameter%setVolatilityTolerance : @storage
UPDATE 7; # @storage
}
{
# == setVwapContract == # @parameter%setVwapContract : @storage
AMOUNT; # @amount : @parameter%setVwapContract : @storage
PUSH mutez 0; # mutez : @amount : @parameter%setVwapContract : @storage
COMPARE; # int : @parameter%setVwapContract : @storage
EQ; # bool : @parameter%setVwapContract : @storage
IF
{}
{
AMOUNT; # @amount : @parameter%setVwapContract : @storage
FAILWITH; # FAILED
}; # @parameter%setVwapContract : @storage
SWAP; # @storage : @parameter%setVwapContract
# sp.verify(sp.sender == self.data.governorContractAddress, 1) # @storage : @parameter%setVwapContract
DUP; # @storage : @storage : @parameter%setVwapContract
DUG 2; # @storage : @parameter%setVwapContract : @storage
CAR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @parameter%setVwapContract : @storage
CAR; # pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : @parameter%setVwapContract : @storage
CAR; # pair (address %governorContractAddress) (timestamp %lastTradeTime) : @parameter%setVwapContract : @storage
CAR; # address : @parameter%setVwapContract : @storage
SENDER; # @sender : address : @parameter%setVwapContract : @storage
COMPARE; # int : @parameter%setVwapContract : @storage
EQ; # bool : @parameter%setVwapContract : @storage
IF
{}
{
PUSH int 1; # int : @parameter%setVwapContract : @storage
FAILWITH; # FAILED
}; # @parameter%setVwapContract : @storage
# self.data.vwapContractAddress = params # @parameter%setVwapContract : @storage
UPDATE 8; # @storage
}; # @storage
NIL operation; # list operation : @storage
}
{
IF_LEFT
{
DROP; # @storage
# == tokenToTezPayment == # @storage
AMOUNT; # @amount : @storage
PUSH mutez 0; # mutez : @amount : @storage
COMPARE; # int : @storage
EQ; # bool : @storage
IF
{}
{
AMOUNT; # @amount : @storage
FAILWITH; # FAILED
}; # @storage
# sp.verify(self.data.paused == False, 5) # @storage
DUP; # @storage : @storage
CAR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @storage
GET 3; # pair (address %pauseGuardianContractAddress) (bool %paused) : @storage
CDR; # bool : @storage
PUSH bool False; # bool : bool : @storage
COMPARE; # int : @storage
EQ; # bool : @storage
IF
{}
{
PUSH int 5; # int : @storage
FAILWITH; # FAILED
}; # @storage
# sp.verify(sp.as_nat(sp.now - self.data.lastTradeTime) >= self.data.minTradeDelaySec, 7) # @storage
DUP; # @storage : @storage
CAR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : @storage
CAR; # pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : @storage
GET 4; # nat : @storage
SWAP; # @storage : nat
DUP; # @storage : @storage : nat
DUG 2; # @storage : nat : @storage
CAR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : nat : @storage
CAR; # pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : nat : @storage
CAR; # pair (address %governorContractAddress) (timestamp %lastTradeTime) : nat : @storage
CDR; # timestamp : nat : @storage
NOW; # @now : timestamp : nat : @storage
SUB; # int : nat : @storage
ISNAT; # option nat : nat : @storage
IF_NONE
{
PUSH int 82; # int : nat : @storage
FAILWITH; # FAILED
}
{}; # @some : nat : @storage
COMPARE; # int : @storage
GE; # bool : @storage
IF
{}
{
PUSH int 7; # int : @storage
FAILWITH; # FAILED
}; # @storage
# harbingerVwap = sp.local("harbingerVwap", sp.view("getPrice", 'XTZ-USD', self.data.vwapContractAddress, sp.TPair(sp.TTimestamp, sp.TNat)).open_some(message = 11)) # @storage
DUP; # @storage : @storage
GET 8; # address : @storage
PUSH string "XTZ-USD"; # string : address : @storage
VIEW "getPrice" (pair timestamp nat); # option (pair timestamp nat) : @storage
IF_NONE
{
PUSH int 11; # int : @storage
FAILWITH; # FAILED
}
{}; # @some : @storage
SWAP; # @storage : @some
# harbingerSpot = sp.local("harbingerSpot", sp.view("getPrice", 'XTZ-USD', self.data.spotContractAddress, sp.TPair(sp.TTimestamp, sp.TPair(sp.TTimestamp, sp.TPair(sp.TNat, sp.TPair(sp.TNat, sp.TPair(sp.TNat, sp.TPair(sp.TNat, sp.TNat))))))).open_some(message = 12)) # @storage : @some
DUP; # @storage : @storage : @some
DUG 2; # @storage : @some : @storage
GET 3; # pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress)) : @some : @storage
CAR; # pair (address %spotContractAddress) (nat %spreadAmount) : @some : @storage
CAR; # address : @some : @storage
PUSH string "XTZ-USD"; # string : address : @some : @storage
VIEW "getPrice" (pair timestamp (pair timestamp (pair nat (pair nat (pair nat (pair nat nat)))))); # option (pair timestamp (pair timestamp (pair nat (pair nat (pair nat (pair nat nat)))))) : @some : @storage
IF_NONE
{
PUSH int 12; # int : @some : @storage
FAILWITH; # FAILED
}
{}; # @some : @some : @storage
# spotPrice = sp.local("spotPrice", sp.fst(sp.snd(sp.snd(sp.snd(sp.snd(sp.snd(harbingerSpot.value))))))) # @some : @some : @storage
DUP; # @some : @some : @some : @storage
GET 11; # nat : @some : @some : @storage
# sp.verify(sp.as_nat(sp.now - sp.fst(sp.snd(harbingerSpot.value))) <= self.data.maxDataDelaySec, 4) # nat : @some : @some : @storage
DUP 4; # @storage : nat : @some : @some : @storage
CAR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : nat : @some : @some : @storage
CAR; # pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : nat : @some : @some : @storage
GET 3; # nat : nat : @some : @some : @storage
DIG 2; # @some : nat : nat : @some : @storage
GET 3; # timestamp : nat : nat : @some : @storage
NOW; # @now : timestamp : nat : nat : @some : @storage
SUB; # int : nat : nat : @some : @storage
ISNAT; # option nat : nat : nat : @some : @storage
IF_NONE
{
PUSH int 124; # int : nat : nat : @some : @storage
FAILWITH; # FAILED
}
{}; # @some : nat : nat : @some : @storage
COMPARE; # int : nat : @some : @storage
LE; # bool : nat : @some : @storage
IF
{}
{
PUSH int 4; # int : nat : @some : @storage
FAILWITH; # FAILED
}; # nat : @some : @storage
# sp.verify(sp.as_nat(sp.now - sp.fst(harbingerVwap.value)) <= self.data.maxDataDelaySec, 4) # nat : @some : @storage
DUP 3; # @storage : nat : @some : @storage
CAR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : nat : @some : @storage
CAR; # pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec)) : nat : @some : @storage
GET 3; # nat : nat : @some : @storage
DUP 3; # @some : nat : nat : @some : @storage
CAR; # timestamp : nat : nat : @some : @storage
NOW; # @now : timestamp : nat : nat : @some : @storage
SUB; # int : nat : nat : @some : @storage
ISNAT; # option nat : nat : nat : @some : @storage
IF_NONE
{
PUSH int 128; # int : nat : nat : @some : @storage
FAILWITH; # FAILED
}
{}; # @some : nat : nat : @some : @storage
COMPARE; # int : nat : @some : @storage
LE; # bool : nat : @some : @storage
IF
{}
{
PUSH int 4; # int : nat : @some : @storage
FAILWITH; # FAILED
}; # nat : @some : @storage
# harbingerSpotPrice = sp.local("harbingerSpotPrice", (spotPrice.value * 1000000000000000000) // 1000000) # nat : @some : @storage
PUSH nat 1000000; # nat : nat : @some : @storage
PUSH nat 1000000000000000000; # nat : nat : nat : @some : @storage
DUP 3; # nat : nat : nat : nat : @some : @storage
MUL; # nat : nat : nat : @some : @storage
EDIV; # option (pair nat nat) : nat : @some : @storage
IF_NONE
{
PUSH int 133; # int : nat : @some : @storage
FAILWITH; # FAILED
}
{
CAR; # nat : nat : @some : @storage
}; # nat : nat : @some : @storage
# sp.verify(self.data.volatilityTolerance > (((abs(((sp.snd(harbingerVwap.value) * 1000000000000000000) // 1000000) - harbingerSpotPrice.value)) * 100) // harbingerSpotPrice.value), 16) # nat : nat : @some : @storage
DUP; # nat : nat : nat : @some : @storage
PUSH nat 100; # nat : nat : nat : nat : @some : @storage
DIG 2; # nat : nat : nat : nat : @some : @storage
PUSH nat 1000000; # nat : nat : nat : nat : nat : @some : @storage
PUSH nat 1000000000000000000; # nat : nat : nat : nat : nat : nat : @some : @storage
DIG 6; # @some : nat : nat : nat : nat : nat : nat : @storage
CDR; # nat : nat : nat : nat : nat : nat : nat : @storage
MUL; # nat : nat : nat : nat : nat : nat : @storage
EDIV; # option (pair nat nat) : nat : nat : nat : nat : @storage
IF_NONE
{
PUSH int 132; # int : nat : nat : nat : nat : @storage
FAILWITH; # FAILED
}
{
CAR; # nat : nat : nat : nat : nat : @storage
}; # nat : nat : nat : nat : nat : @storage
SUB; # int : nat : nat : nat : @storage
ABS; # nat : nat : nat : nat : @storage
MUL; # nat : nat : nat : @storage
EDIV; # option (pair nat nat) : nat : @storage
IF_NONE
{
PUSH int 136; # int : nat : @storage
FAILWITH; # FAILED
}
{
CAR; # nat : nat : @storage
}; # nat : nat : @storage
DUP 3; # @storage : nat : nat : @storage
GET 7; # nat : nat : nat : @storage
COMPARE; # int : nat : @storage
GT; # bool : nat : @storage
IF
{}
{
PUSH int 16; # int : nat : @storage
FAILWITH; # FAILED
}; # nat : @storage
# tokensToTrade = sp.local("tokensToTrade", self.data.tradeAmount * 1000000000000000000) # nat : @storage
PUSH nat 1000000000000000000; # nat : nat : @storage
DUP 3; # @storage : nat : nat : @storage
GET 5; # pair (nat %tokenBalance) (nat %tradeAmount) : nat : nat : @storage
CDR; # nat : nat : nat : @storage
MUL; # nat : nat : @storage
# sp.transfer((self.data.quipuswapContractAddress, tokensToTrade.value), sp.tez(0), sp.contract(sp.TPair(sp.TAddress, sp.TNat), self.data.tokenAddress, entry_point='approve').open_some(message = 15)) # nat : nat : @storage
NIL operation; # list operation : nat : nat : @storage
DUP 4; # @storage : list operation : nat : nat : @storage
GET 3; # pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress)) : list operation : nat : nat : @storage
GET 4; # address : list operation : nat : nat : @storage
CONTRACT %approve (pair address nat); # option (contract (pair address nat)) : list operation : nat : nat : @storage
IF_NONE
{
PUSH int 15; # int : list operation : nat : nat : @storage
FAILWITH; # FAILED
}
{}; # @some : list operation : nat : nat : @storage
PUSH mutez 0; # mutez : @some : list operation : nat : nat : @storage
DUP 4; # nat : mutez : @some : list operation : nat : nat : @storage
DUP 7; # @storage : nat : mutez : @some : list operation : nat : nat : @storage
CAR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : nat : mutez : @some : list operation : nat : nat : @storage
GET 5; # address : nat : mutez : @some : list operation : nat : nat : @storage
PAIR; # pair address nat : mutez : @some : list operation : nat : nat : @storage
TRANSFER_TOKENS; # operation : list operation : nat : nat : @storage
CONS; # list operation : nat : nat : @storage
# sp.transfer(((tokensToTrade.value, (((tokensToTrade.value // spotPrice.value) // 1000000) * (100 + self.data.spreadAmount)) // 100), self.data.receiverContractAddress), sp.tez(0), sp.contract(sp.TPair(sp.TPair(sp.TNat, sp.TNat), sp.TAddress), self.data.quipuswapContractAddress, entry_point='tokenToTezPayment').open_some(message = 13)) # list operation : nat : nat : @storage
DUP 4; # @storage : list operation : nat : nat : @storage
CAR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : list operation : nat : nat : @storage
GET 5; # address : list operation : nat : nat : @storage
CONTRACT %tokenToTezPayment (pair (pair nat nat) address); # option (contract (pair (pair nat nat) address)) : list operation : nat : nat : @storage
IF_NONE
{
PUSH int 13; # int : list operation : nat : nat : @storage
FAILWITH; # FAILED
}
{}; # @some : list operation : nat : nat : @storage
PUSH mutez 0; # mutez : @some : list operation : nat : nat : @storage
DUP 6; # @storage : mutez : @some : list operation : nat : nat : @storage
CAR; # pair (pair (pair (address %governorContractAddress) (timestamp %lastTradeTime)) (pair (nat %maxDataDelaySec) (nat %minTradeDelaySec))) (pair (pair (address %pauseGuardianContractAddress) (bool %paused)) (pair (address %quipuswapContractAddress) (address %receiverContractAddress))) : mutez : @some : list operation : nat : nat : @storage
GET 6; # address : mutez : @some : list operation : nat : nat : @storage
PUSH nat 100; # nat : address : mutez : @some : list operation : nat : nat : @storage
DUP 8; # @storage : nat : address : mutez : @some : list operation : nat : nat : @storage
GET 3; # pair (pair (address %spotContractAddress) (nat %spreadAmount)) (pair (int %state) (address %tokenAddress)) : nat : address : mutez : @some : list operation : nat : nat : @storage
CAR; # pair (address %spotContractAddress) (nat %spreadAmount) : nat : address : mutez : @some : list operation : nat : nat : @storage
CDR; # nat : nat : address : mutez : @some : list operation : nat : nat : @storage
PUSH nat 100; # nat : nat : nat : address : mutez : @some : list operation : nat : nat : @storage
ADD; # nat : nat : address : mutez : @some : list operation : nat : nat : @storage
PUSH nat 1000000; # nat : nat : nat : address : mutez : @some : list operation : nat : nat : @storage
DIG 8; # nat : nat : nat : nat : address : mutez : @some : list operation : nat : @storage
DUP 9; # nat : nat : nat : nat : nat : address : mutez : @some : list operation : nat : @storage
EDIV; # option (pair nat nat) : nat : nat : nat : address : mutez : @some : list operation : nat : @storage
IF_NONE
{
PUSH int 144; # int : nat : nat : nat : address : mutez : @some : list operation : nat : @storage
FAILWITH; # FAILED
}
{
CAR; # nat : nat : nat : nat : address : mutez : @some : list operation : nat : @storage
}; # nat : nat : nat : nat : address : mutez : @some : list operation : nat : @storage
EDIV; # option (pair nat nat) : nat : nat : address : mutez : @some : list operation : nat : @storage
IF_NONE
{
PUSH int 144; # int : nat : nat : address : mutez : @some : list operation : nat : @storage
FAILWITH; # FAILED
}
{
CAR; # nat : nat : nat : address : mutez : @some : list operation : nat : @storage
}; # nat : nat : nat : address : mutez : @some : list operation : nat : @storage
MUL; # nat : nat : address : mutez : @some : list operation : nat : @storage
EDIV; # option (pair nat nat) : address : mutez : @some : list operation : nat : @storage
IF_NONE
{
PUSH int 149; # int : address : mutez : @some : list operation : nat : @storage
FAILWITH; # FAILED
}
{
CAR; # nat : address : mutez : @some : list operation : nat : @storage
}; # nat : address : mutez : @some : list operation : nat : @storage
DIG 5; # nat : nat : address : mutez : @some : list operation : @storage
PAIR; # pair nat nat : address : mutez : @some : list operation : @storage
PAIR; # pair (pair nat nat) address : mutez : @some : list operation : @storage
TRANSFER_TOKENS; # operation : list operation : @storage
CONS; # list operation : @storage
SWAP; # @storage : list operation
# self.data.lastTradeTime = sp.now # @storage : list operation