This repository has been archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathtesting.log
4297 lines (4125 loc) · 384 KB
/
testing.log
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
#### MAY 5, 2022
###################################### DEVNET ################################
[nix-shell:~/src/cardano-node]$ cardano-cli transaction build \
--alonzo-era \
--cardano-mode \
--testnet-magic 42 \
--tx-in "38422a5d7d8251207f786610b7c4ff50fb705731111756c870a3b15d4d164fb2#0" \
--tx-out "addr_test1vpxvm0cg4s9asahunnc6cqldsm8w7szjehn6fxyut858sxgqvc3q5+1000000000" \
--tx-out "addr_test1vpxvm0cg4s9asahunnc6cqldsm8w7szjehn6fxyut858sxgqvc3q5+10000000" \
--tx-out "addr_test1vzhh5k62vdheacdylpzr5xy6kldylhrenqsm743hulngn5c34khju+1000000000" \
--tx-out "addr_test1vzhh5k62vdheacdylpzr5xy6kldylhrenqsm743hulngn5c34khju+10000000" \
--tx-out "addr_test1vzzrzjrckm7udfjm8jvfsw3t4w8zw989my85az49460sy6qmfy687+1000000000" \
--tx-out "addr_test1vzzrzjrckm7udfjm8jvfsw3t4w8zw989my85az49460sy6qmfy687+10000000" \
--change-address "addr_test1vp5nk36pnx4gkd9mk44gx35m7e7el3nxgxhu2m484aurnwcc75528" \
--out-file "$WORK/transfer-tx-alonzo.body"
[nix-shell:~/src/cardano-node]$ cardano-cli transaction sign \
--tx-body-file "$WORK/transfer-tx-alonzo.body" \
--testnet-magic 42 \
--signing-key-file "/home/lawrence/.cache/cardano-workbench/genesis/k3-d1-0.003kD-0kU-9082bbc/utxo-keys/utxo1.skey" \
[nix-shell:~/src/cardano-node]$ cardano-cli transaction submit --tx-file $WORK/transfer-tx-alonzo.tx --testnet-magic 42
/nix/store/jnf78clpqljssksprypgp7rarfr9wj30-cabal-install-exe-cabal-3.6.2.0/bin/cabal --project-file=/home/lawrence/src/cardano-node/.nix-shell-cabal.project -v0 run exe:cardano-cli -- transaction submit --tx-file /home/lawrence/src/cardano-lottery/work/transfer-tx-alonzo.tx --testnet-magic 42
Transaction successfully submitted.
lawrence@lawrence-MacBookAir:~/src/cardano-lottery/scripts/cardano-cli/devnet$ ./run-devnet-test.sh
+ '[' -z devnet ']'
+ ENV=devnet
+++ readlink -f ./init-lotto-tx.sh
++ dirname /home/lawrence/src/cardano-lottery/scripts/cardano-cli/init-lotto-tx.sh
+ MY_DIR=/home/lawrence/src/cardano-lottery/scripts/cardano-cli
+ source /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/global-export-variables.sh
++ set -e
++ set -o pipefail
++ export PROJECT_ID=
++ PROJECT_ID=
++ export BASE=/home/lawrence/src/cardano-lottery
++ BASE=/home/lawrence/src/cardano-lottery
++ export WORK=/home/lawrence/src/cardano-lottery/work
++ WORK=/home/lawrence/src/cardano-lottery/work
++ export CARDANO_CLI=/home/lawrence/.local/bin/cardano-cli
++ CARDANO_CLI=/home/lawrence/.local/bin/cardano-cli
++ export CARDANO_NODE_SOCKET_PATH=/home/lawrence/src/cardano-node/run/current/node-0/node.socket
++ CARDANO_NODE_SOCKET_PATH=/home/lawrence/src/cardano-node/run/current/node-0/node.socket
++ export TESTNET_MAGIC=42
++ TESTNET_MAGIC=42
++ export ADMIN_VKEY=/home/lawrence/.local/keys/devnet/01.vkey
++ ADMIN_VKEY=/home/lawrence/.local/keys/devnet/01.vkey
++ export ADMIN_SKEY=/home/lawrence/.local/keys/devnet/01.skey
++ ADMIN_SKEY=/home/lawrence/.local/keys/devnet/01.skey
++ export ADMIN_PKH=/home/lawrence/.local/keys/devnet/01.pkh
++ ADMIN_PKH=/home/lawrence/.local/keys/devnet/01.pkh
++ export PLAYER_VKEY=/home/lawrence/.local/keys/devnet/02.vkey
++ PLAYER_VKEY=/home/lawrence/.local/keys/devnet/02.vkey
++ export PLAYER_SKEY=/home/lawrence/.local/keys/devnet/02.skey
++ PLAYER_SKEY=/home/lawrence/.local/keys/devnet/02.skey
++ export PLAYER_PKH=/home/lawrence/.local/keys/devnet/02.pkh
++ PLAYER_PKH=/home/lawrence/.local/keys/devnet/02.pkh
++ export SPONSOR_VKEY=/home/lawrence/.local/keys/devnet/03.vkey
++ SPONSOR_VKEY=/home/lawrence/.local/keys/devnet/03.vkey
++ export SPONSOR_SKEY=/home/lawrence/.local/keys/devnet/03.skey
++ SPONSOR_SKEY=/home/lawrence/.local/keys/devnet/03.skey
++ export SPONSOR_PKH=/home/lawrence/.local/keys/devnet/03.pkh
++ SPONSOR_PKH=/home/lawrence/.local/keys/devnet/03.pkh
++ export MIN_ADA_OUTPUT_TX=2000000
++ MIN_ADA_OUTPUT_TX=2000000
++ export COLLATERAL_ADA=10000000
++ COLLATERAL_ADA=10000000
++ export ADMIN_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#2
++ ADMIN_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#2
++ export PLAYER_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#4
++ PLAYER_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#4
++ export SPONSOR_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#6
++ SPONSOR_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#6
+ echo 'Socket path: /home/lawrence/src/cardano-node/run/current/node-0/node.socket'
Socket path: /home/lawrence/src/cardano-node/run/current/node-0/node.socket
+ ls -al /home/lawrence/src/cardano-node/run/current/node-0/node.socket
srwxr-xr-x 1 lawrence lawrence 0 May 5 17:35 /home/lawrence/src/cardano-node/run/current/node-0/node.socket
+ mkdir -p /home/lawrence/src/cardano-lottery/work
+ mkdir -p /home/lawrence/src/cardano-lottery/work-backup
+ rm -f /home/lawrence/src/cardano-lottery/work/pparms.json
+ rm -f '/home/lawrence/src/cardano-lottery/work-backup/*'
+ ticket_cost=20000
+ initial_funding=10000000
+ fee_percentage=2
+ /home/lawrence/.local/bin/cardano-cli query protocol-parameters --testnet-magic 42 --out-file /home/lawrence/src/cardano-lottery/work/pparms.json
+ lotto_validator_script=/home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-validator.plutus
+ minting_script=/home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-thread-token-policy.plutus
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-thread-token-policy.hash
++ jq -r .bytes
+ lotto_mph=aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b
++ /home/lawrence/.local/bin/cardano-cli address build --payment-script-file /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-validator.plutus --testnet-magic 42
+ lotto_validator_script_addr=addr_test1wzutcjsh63tg2xj903fqaan5yaw5d9tfzc840yjtnmn7x3gzpqvuj
+ redeemer_file_path=/home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/redeemer-thread-token-mint.json
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-token-name.json
++ jq -r .bytes
+ lotto_token_name=63ccb5f9d5b513f35693ca27db774839035772259c9b9c37c41343054d9da41e
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/buy-token-name.json
++ jq -r .bytes
+ buy_token_name=ec9925d73a23474fc288bee2b07b84f762179b338b2b0e9397c0cde1c20515f7
++ cat /home/lawrence/.local/keys/devnet/01.pkh
+ admin_pkh=4ccdbf08ac0bd876fc9cf1ac03ed86ceef4052cde7a4989c59e87819
++ cat /home/lawrence/.local/keys/devnet/03.pkh
+ sponsor_pkh=84314878b6fdc6a65b3c98983a2bab8e2714e5d90f4e8aa5ae9f0268
+ echo 'starting lotto init'
starting lotto init
+ echo 'Script: /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-validator.plutus'
Script: /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-validator.plutus
++ /home/lawrence/.local/bin/cardano-cli address build --testnet-magic 42 --payment-verification-key-file /home/lawrence/.local/keys/devnet/01.vkey
+ admin_utxo_addr=addr_test1vpxvm0cg4s9asahunnc6cqldsm8w7szjehn6fxyut858sxgqvc3q5
+ /home/lawrence/.local/bin/cardano-cli query utxo --address addr_test1vpxvm0cg4s9asahunnc6cqldsm8w7szjehn6fxyut858sxgqvc3q5 --cardano-mode --testnet-magic 42 --out-file /home/lawrence/src/cardano-lottery/work/admin-utxo.json
+ cat /home/lawrence/src/cardano-lottery/work/admin-utxo.json
+ jq -r 'to_entries[] | select(.value.value.lovelace > 10000000 ) | .key'
+ readarray admin_utxo_valid_array
++ echo 08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#1
++ tr -d '\n'
+ admin_utxo_in=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#1
+ cp /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-datum-init.datum /home/lawrence/src/cardano-lottery/work/lotto-datum-out.json
+ /home/lawrence/.local/bin/cardano-cli transaction build --alonzo-era --cardano-mode --testnet-magic 42 --tx-in 08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#1 --tx-in-collateral 08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#2 --mint-script-file /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-thread-token-policy.plutus --mint-redeemer-file /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/redeemer-thread-token-mint.json --tx-out 'addr_test1wzutcjsh63tg2xj903fqaan5yaw5d9tfzc840yjtnmn7x3gzpqvuj+10000000 + 1 aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b.63ccb5f9d5b513f35693ca27db774839035772259c9b9c37c41343054d9da41e + 1 aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b.ec9925d73a23474fc288bee2b07b84f762179b338b2b0e9397c0cde1c20515f7' --tx-out-datum-embed-file /home/lawrence/src/cardano-lottery/work/lotto-datum-out.json --mint '1 aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b.63ccb5f9d5b513f35693ca27db774839035772259c9b9c37c41343054d9da41e + 1 aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b.ec9925d73a23474fc288bee2b07b84f762179b338b2b0e9397c0cde1c20515f7' --change-address addr_test1vpxvm0cg4s9asahunnc6cqldsm8w7szjehn6fxyut858sxgqvc3q5 --protocol-params-file /home/lawrence/src/cardano-lottery/work/pparms.json --out-file /home/lawrence/src/cardano-lottery/work/init-tx-alonzo.body
Estimated transaction fee: Lovelace 100671
+ echo 'tx has been built'
tx has been built
+ /home/lawrence/.local/bin/cardano-cli transaction sign --tx-body-file /home/lawrence/src/cardano-lottery/work/init-tx-alonzo.body --testnet-magic 42 --signing-key-file /home/lawrence/.local/keys/devnet/01.skey --out-file /home/lawrence/src/cardano-lottery/work/init-tx-alonzo.tx
+ echo 'tx has been signed'
tx has been signed
+ echo 'Submit the tx with plutus script and wait 5 seconds...'
Submit the tx with plutus script and wait 5 seconds...
+ /home/lawrence/.local/bin/cardano-cli transaction submit --tx-file /home/lawrence/src/cardano-lottery/work/init-tx-alonzo.tx --testnet-magic 42
Transaction successfully submitted.
please confirm before proceeding that you see the init tx on the blockchain
[nix-shell:/home/lawrence/src/cardano-lottery]$ cardano-cli query utxo --address addr_test1wzutcjsh63tg2xj903fqaan5yaw5d9tfzc840yjtnmn7x3gzpqvuj --cardano-mode --testnet-magic 42
TxHash TxIx Amount
--------------------------------------------------------------------------------------
0c3ce05e4089d3992e78c15071465ccdfcd91dd158394503b3b638bf2af6050b 1 10000000 lovelace + 1 aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b.63ccb5f9d5b513f35693ca27db774839035772259c9b9c37c41343054d9da41e + 1 aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b.ec9925d73a23474fc288bee2b07b84f762179b338b2b0e9397c0cde1c20515f7 + TxOutDatumHash ScriptDataInAlonzoEra "dd9c151fd36723f6460f7499c0f8623d63efd5b611379fa62f1e45780f21ba02"
+ '[' -z devnet ']'
+ ENV=devnet
+++ readlink -f ./open-lotto-tx.sh
++ dirname /home/lawrence/src/cardano-lottery/scripts/cardano-cli/open-lotto-tx.sh
+ MY_DIR=/home/lawrence/src/cardano-lottery/scripts/cardano-cli
+ source /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/global-export-variables.sh
++ set -e
++ set -o pipefail
++ export PROJECT_ID=
++ PROJECT_ID=
++ export BASE=/home/lawrence/src/cardano-lottery
++ BASE=/home/lawrence/src/cardano-lottery
++ export WORK=/home/lawrence/src/cardano-lottery/work
++ WORK=/home/lawrence/src/cardano-lottery/work
++ export CARDANO_CLI=/home/lawrence/.local/bin/cardano-cli
++ CARDANO_CLI=/home/lawrence/.local/bin/cardano-cli
++ export CARDANO_NODE_SOCKET_PATH=/home/lawrence/src/cardano-node/run/current/node-0/node.socket
++ CARDANO_NODE_SOCKET_PATH=/home/lawrence/src/cardano-node/run/current/node-0/node.socket
++ export TESTNET_MAGIC=42
++ TESTNET_MAGIC=42
++ export ADMIN_VKEY=/home/lawrence/.local/keys/devnet/01.vkey
++ ADMIN_VKEY=/home/lawrence/.local/keys/devnet/01.vkey
++ export ADMIN_SKEY=/home/lawrence/.local/keys/devnet/01.skey
++ ADMIN_SKEY=/home/lawrence/.local/keys/devnet/01.skey
++ export ADMIN_PKH=/home/lawrence/.local/keys/devnet/01.pkh
++ ADMIN_PKH=/home/lawrence/.local/keys/devnet/01.pkh
++ export PLAYER_VKEY=/home/lawrence/.local/keys/devnet/02.vkey
++ PLAYER_VKEY=/home/lawrence/.local/keys/devnet/02.vkey
++ export PLAYER_SKEY=/home/lawrence/.local/keys/devnet/02.skey
++ PLAYER_SKEY=/home/lawrence/.local/keys/devnet/02.skey
++ export PLAYER_PKH=/home/lawrence/.local/keys/devnet/02.pkh
++ PLAYER_PKH=/home/lawrence/.local/keys/devnet/02.pkh
++ export SPONSOR_VKEY=/home/lawrence/.local/keys/devnet/03.vkey
++ SPONSOR_VKEY=/home/lawrence/.local/keys/devnet/03.vkey
++ export SPONSOR_SKEY=/home/lawrence/.local/keys/devnet/03.skey
++ SPONSOR_SKEY=/home/lawrence/.local/keys/devnet/03.skey
++ export SPONSOR_PKH=/home/lawrence/.local/keys/devnet/03.pkh
++ SPONSOR_PKH=/home/lawrence/.local/keys/devnet/03.pkh
++ export MIN_ADA_OUTPUT_TX=2000000
++ MIN_ADA_OUTPUT_TX=2000000
++ export COLLATERAL_ADA=10000000
++ COLLATERAL_ADA=10000000
++ export ADMIN_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#2
++ ADMIN_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#2
++ export PLAYER_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#4
++ PLAYER_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#4
++ export SPONSOR_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#6
++ SPONSOR_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#6
+ echo 'Socket path: /home/lawrence/src/cardano-node/run/current/node-0/node.socket'
Socket path: /home/lawrence/src/cardano-node/run/current/node-0/node.socket
+ ls -al /home/lawrence/src/cardano-node/run/current/node-0/node.socket
srwxr-xr-x 1 lawrence lawrence 0 May 5 17:35 /home/lawrence/src/cardano-node/run/current/node-0/node.socket
+ mkdir -p /home/lawrence/src/cardano-lottery/work
+ mkdir -p /home/lawrence/src/cardano-lottery/work-backup
+ cp -f /home/lawrence/src/cardano-lottery/work/admin-utxo-valid.json /home/lawrence/src/cardano-lottery/work/admin-utxo.json /home/lawrence/src/cardano-lottery/work/init-tx-alonzo.body /home/lawrence/src/cardano-lottery/work/init-tx-alonzo.tx /home/lawrence/src/cardano-lottery/work/lotto-datum-out.json /home/lawrence/src/cardano-lottery/work/pparms.json /home/lawrence/src/cardano-lottery/work-backup
+ ticket_cost=20000
+ additional_funding=10000000
+ fee_percentage=2
+ /home/lawrence/.local/bin/cardano-cli query protocol-parameters --testnet-magic 42 --out-file /home/lawrence/src/cardano-lottery/work/pparms.json
+ lotto_validator_script=/home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-validator.plutus
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-validator.hash
+ lotto_validator_hash='{"bytes":"b8bc4a17d456851a457c520ef674275d469569160f57924b9ee7e345"}'
++ /home/lawrence/.local/bin/cardano-cli address build --payment-script-file /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-validator.plutus --testnet-magic 42
+ lotto_validator_script_addr=addr_test1wzutcjsh63tg2xj903fqaan5yaw5d9tfzc840yjtnmn7x3gzpqvuj
+ redeemer_file_path=/home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/redeemer-lotto-open.json
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-val-addr.json
+ lotto_validator_addr='{"fields":[{"fields":[{"bytes":"b8bc4a17d456851a457c520ef674275d469569160f57924b9ee7e345"}],"constructor":1},{"fields":[],"constructor":1}],"constructor":0}'
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-token-name.json
++ jq -r .bytes
+ lotto_token_name=63ccb5f9d5b513f35693ca27db774839035772259c9b9c37c41343054d9da41e
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-token-value.json
+ lotto_token_value='{"map":[{"k":{"bytes":"aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b"},"v":{"map":[{"k":{"bytes":"63ccb5f9d5b513f35693ca27db774839035772259c9b9c37c41343054d9da41e"},"v":{"int":1}}]}}]}'
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/buy-val-addr.json
+ buy_validator_addr='{"fields":[{"fields":[{"bytes":"7dfb757ecbd0d7a14a42622f0d9d3f305dcd381de19c5299e8262978"}],"constructor":1},{"fields":[],"constructor":1}],"constructor":0}'
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/buy-token-name.json
++ jq -r .bytes
+ buy_token_name=ec9925d73a23474fc288bee2b07b84f762179b338b2b0e9397c0cde1c20515f7
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/buy-token-value.json
+ buy_token_value='{"map":[{"k":{"bytes":"aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b"},"v":{"map":[{"k":{"bytes":"ec9925d73a23474fc288bee2b07b84f762179b338b2b0e9397c0cde1c20515f7"},"v":{"int":1}}]}}]}'
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/ticket-policy.hash
++ jq -r .bytes
+ ticket_mph=32350c5781b4fa6649e3bf09e18fb9309b2fdc2ba58528fad93910db
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-thread-token-policy.hash
++ jq -r .bytes
+ thread_token_mph=aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b
++ cat /home/lawrence/.local/keys/devnet/01.pkh
+ admin_pkh=4ccdbf08ac0bd876fc9cf1ac03ed86ceef4052cde7a4989c59e87819
++ cat /home/lawrence/.local/keys/devnet/03.pkh
+ sponsor_pkh=84314878b6fdc6a65b3c98983a2bab8e2714e5d90f4e8aa5ae9f0268
+ echo 'starting lotto open'
starting lotto open
+ echo 'Script: '
Script:
++ /home/lawrence/.local/bin/cardano-cli address build --testnet-magic 42 --payment-verification-key-file /home/lawrence/.local/keys/devnet/01.vkey
+ admin_utxo_addr=addr_test1vpxvm0cg4s9asahunnc6cqldsm8w7szjehn6fxyut858sxgqvc3q5
+ /home/lawrence/.local/bin/cardano-cli query utxo --address addr_test1vpxvm0cg4s9asahunnc6cqldsm8w7szjehn6fxyut858sxgqvc3q5 --cardano-mode --testnet-magic 42 --out-file /home/lawrence/src/cardano-lottery/work/admin-utxo.json
+ cat /home/lawrence/src/cardano-lottery/work/admin-utxo.json
+ jq -r 'to_entries[] | select(.value.value.lovelace > 10000000 ) | .key'
+ readarray admin_utxo_valid_array
++ echo 0c3ce05e4089d3992e78c15071465ccdfcd91dd158394503b3b638bf2af6050b#0
++ tr -d '\n'
+ admin_utxo_in=0c3ce05e4089d3992e78c15071465ccdfcd91dd158394503b3b638bf2af6050b#0
+ /home/lawrence/.local/bin/cardano-cli query utxo --address addr_test1wzutcjsh63tg2xj903fqaan5yaw5d9tfzc840yjtnmn7x3gzpqvuj --testnet-magic 42 --out-file /home/lawrence/src/cardano-lottery/work/lotto-validator-utxo.json
++ jq -r 'to_entries[]
| select(.value.value."aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b"."63ccb5f9d5b513f35693ca27db774839035772259c9b9c37c41343054d9da41e")
| .key' /home/lawrence/src/cardano-lottery/work/lotto-validator-utxo.json
+ lotto_validator_utxo_tx_in=0c3ce05e4089d3992e78c15071465ccdfcd91dd158394503b3b638bf2af6050b#1
+ '[' devnet == devnet ']'
+ cp /home/lawrence/src/cardano-lottery/work/lotto-datum-out.json /home/lawrence/src/cardano-lottery/work/lotto-datum-in.json
++ jq -r '.fields[2].int' /home/lawrence/src/cardano-lottery/work/lotto-datum-in.json
+ jackpot=10000000
++ jq -r '.fields[3].int' /home/lawrence/src/cardano-lottery/work/lotto-datum-in.json
+ seq_num=0
++ jq -r '.fields[4].int' /home/lawrence/src/cardano-lottery/work/lotto-datum-in.json
+ treasury=0
+ [[ 10000000 -gt 0 ]]
+ new_jackpot=20000000
+ new_treasury=0
+ new_seq_num=1
+ cat /home/lawrence/src/cardano-lottery/work/lotto-datum-in.json
+ jq -c '
.fields[0].fields[0].bytes |= "4ccdbf08ac0bd876fc9cf1ac03ed86ceef4052cde7a4989c59e87819"
| .fields[0].fields[1].bytes |= "84314878b6fdc6a65b3c98983a2bab8e2714e5d90f4e8aa5ae9f0268"
| .fields[0].fields[2] |= {"fields":[{"fields":[{"bytes":"b8bc4a17d456851a457c520ef674275d469569160f57924b9ee7e345"}],"constructor":1},{"fields":[],"constructor":1}],"constructor":0}
| .fields[0].fields[3] |= {"map":[{"k":{"bytes":"aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b"},"v":{"map":[{"k":{"bytes":"63ccb5f9d5b513f35693ca27db774839035772259c9b9c37c41343054d9da41e"},"v":{"int":1}}]}}]}
| .fields[0].fields[4] |= {"fields":[{"fields":[{"bytes":"7dfb757ecbd0d7a14a42622f0d9d3f305dcd381de19c5299e8262978"}],"constructor":1},{"fields":[],"constructor":1}],"constructor":0}
| .fields[0].fields[5] |= {"map":[{"k":{"bytes":"aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b"},"v":{"map":[{"k":{"bytes":"ec9925d73a23474fc288bee2b07b84f762179b338b2b0e9397c0cde1c20515f7"},"v":{"int":1}}]}}]}
| .fields[0].fields[6].bytes |= "32350c5781b4fa6649e3bf09e18fb9309b2fdc2ba58528fad93910db"
| .fields[0].fields[7].int |= 2
| .fields[0].fields[8].int |= 20000
| .fields[1].list |= [{"fields":[{"bytes":"84314878b6fdc6a65b3c98983a2bab8e2714e5d90f4e8aa5ae9f0268"},{"list":[]}], "constructor": 0}]
| .fields[2].int |= 20000000
| .fields[3].int |= 1
| .fields[4].int |= 0
| .fields[6].map |= [{"k":{"bytes":"84314878b6fdc6a65b3c98983a2bab8e2714e5d90f4e8aa5ae9f0268"},"v":{"int":0}}]
| .fields[7].int |= 1
| .fields[8].list |= []'
++ jq -r '.fields[2].int + .fields[4].int + .fields[5].int' /home/lawrence/src/cardano-lottery/work/lotto-datum-out.json
+ lotto_value=20000000
+ /home/lawrence/.local/bin/cardano-cli transaction build --alonzo-era --cardano-mode --testnet-magic 42 --tx-in 0c3ce05e4089d3992e78c15071465ccdfcd91dd158394503b3b638bf2af6050b#0 --tx-in 0c3ce05e4089d3992e78c15071465ccdfcd91dd158394503b3b638bf2af6050b#1 --tx-in-script-file /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-validator.plutus --tx-in-datum-file /home/lawrence/src/cardano-lottery/work/lotto-datum-in.json --tx-in-redeemer-file /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/redeemer-lotto-open.json --tx-in-collateral 08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#2 --tx-out 'addr_test1wzutcjsh63tg2xj903fqaan5yaw5d9tfzc840yjtnmn7x3gzpqvuj+20000000 + 1 aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b.63ccb5f9d5b513f35693ca27db774839035772259c9b9c37c41343054d9da41e + 1 aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b.ec9925d73a23474fc288bee2b07b84f762179b338b2b0e9397c0cde1c20515f7' --tx-out-datum-embed-file /home/lawrence/src/cardano-lottery/work/lotto-datum-out.json --change-address addr_test1vpxvm0cg4s9asahunnc6cqldsm8w7szjehn6fxyut858sxgqvc3q5 --required-signer-hash 4ccdbf08ac0bd876fc9cf1ac03ed86ceef4052cde7a4989c59e87819 --protocol-params-file /home/lawrence/src/cardano-lottery/work/pparms.json --out-file /home/lawrence/src/cardano-lottery/work/open-tx-alonzo.body
Estimated transaction fee: Lovelace 686094
+ echo 'tx has been built'
tx has been built
+ /home/lawrence/.local/bin/cardano-cli transaction sign --tx-body-file /home/lawrence/src/cardano-lottery/work/open-tx-alonzo.body --testnet-magic 42 --signing-key-file /home/lawrence/.local/keys/devnet/01.skey --out-file /home/lawrence/src/cardano-lottery/work/open-tx-alonzo.tx
+ echo 'tx has been signed'
tx has been signed
+ echo 'Submit the tx with plutus script and wait 5 seconds...'
Submit the tx with plutus script and wait 5 seconds...
+ /home/lawrence/.local/bin/cardano-cli transaction submit --tx-file /home/lawrence/src/cardano-lottery/work/open-tx-alonzo.tx --testnet-magic 42
Transaction successfully submitted.
please confirm before proceeding that you see the open tx on the blockchain
[nix-shell:/home/lawrence/src/cardano-lottery]$ cardano-cli query utxo --address addr_test1wzutcjsh63tg2xj903fqaan5yaw5d9tfzc840yjtnmn7x3gzpqvuj --cardano-mode --testnet-magic 42
TxHash TxIx Amount
--------------------------------------------------------------------------------------
e975bd76f21d986d14ce78665283a088c3467ca41d99e3b6e2f9ce7416b892bc 1 20000000 lovelace + 1 aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b.63ccb5f9d5b513f35693ca27db774839035772259c9b9c37c41343054d9da41e + 1 aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b.ec9925d73a23474fc288bee2b07b84f762179b338b2b0e9397c0cde1c20515f7 + TxOutDatumHash ScriptDataInAlonzoEra "34640eb34f0a1e61074d3866163b0ffd0f9026dadbc379690f076dc51b281a84"
+ '[' -z devnet ']'
+ ENV=devnet
+++ readlink -f ./startbuy-lotto-tx.sh
++ dirname /home/lawrence/src/cardano-lottery/scripts/cardano-cli/startbuy-lotto-tx.sh
+ MY_DIR=/home/lawrence/src/cardano-lottery/scripts/cardano-cli
+ source /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/global-export-variables.sh
++ set -e
++ set -o pipefail
++ export PROJECT_ID=
++ PROJECT_ID=
++ export BASE=/home/lawrence/src/cardano-lottery
++ BASE=/home/lawrence/src/cardano-lottery
++ export WORK=/home/lawrence/src/cardano-lottery/work
++ WORK=/home/lawrence/src/cardano-lottery/work
++ export CARDANO_CLI=/home/lawrence/.local/bin/cardano-cli
++ CARDANO_CLI=/home/lawrence/.local/bin/cardano-cli
++ export CARDANO_NODE_SOCKET_PATH=/home/lawrence/src/cardano-node/run/current/node-0/node.socket
++ CARDANO_NODE_SOCKET_PATH=/home/lawrence/src/cardano-node/run/current/node-0/node.socket
++ export TESTNET_MAGIC=42
++ TESTNET_MAGIC=42
++ export ADMIN_VKEY=/home/lawrence/.local/keys/devnet/01.vkey
++ ADMIN_VKEY=/home/lawrence/.local/keys/devnet/01.vkey
++ export ADMIN_SKEY=/home/lawrence/.local/keys/devnet/01.skey
++ ADMIN_SKEY=/home/lawrence/.local/keys/devnet/01.skey
++ export ADMIN_PKH=/home/lawrence/.local/keys/devnet/01.pkh
++ ADMIN_PKH=/home/lawrence/.local/keys/devnet/01.pkh
++ export PLAYER_VKEY=/home/lawrence/.local/keys/devnet/02.vkey
++ PLAYER_VKEY=/home/lawrence/.local/keys/devnet/02.vkey
++ export PLAYER_SKEY=/home/lawrence/.local/keys/devnet/02.skey
++ PLAYER_SKEY=/home/lawrence/.local/keys/devnet/02.skey
++ export PLAYER_PKH=/home/lawrence/.local/keys/devnet/02.pkh
++ PLAYER_PKH=/home/lawrence/.local/keys/devnet/02.pkh
++ export SPONSOR_VKEY=/home/lawrence/.local/keys/devnet/03.vkey
++ SPONSOR_VKEY=/home/lawrence/.local/keys/devnet/03.vkey
++ export SPONSOR_SKEY=/home/lawrence/.local/keys/devnet/03.skey
++ SPONSOR_SKEY=/home/lawrence/.local/keys/devnet/03.skey
++ export SPONSOR_PKH=/home/lawrence/.local/keys/devnet/03.pkh
++ SPONSOR_PKH=/home/lawrence/.local/keys/devnet/03.pkh
++ export MIN_ADA_OUTPUT_TX=2000000
++ MIN_ADA_OUTPUT_TX=2000000
++ export COLLATERAL_ADA=10000000
++ COLLATERAL_ADA=10000000
++ export ADMIN_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#2
++ ADMIN_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#2
++ export PLAYER_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#4
++ PLAYER_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#4
++ export SPONSOR_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#6
++ SPONSOR_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#6
+ echo 'Socket path: /home/lawrence/src/cardano-node/run/current/node-0/node.socket'
Socket path: /home/lawrence/src/cardano-node/run/current/node-0/node.socket
+ ls -al /home/lawrence/src/cardano-node/run/current/node-0/node.socket
srwxr-xr-x 1 lawrence lawrence 0 May 5 17:35 /home/lawrence/src/cardano-node/run/current/node-0/node.socket
+ mkdir -p /home/lawrence/src/cardano-lottery/work
+ mkdir -p /home/lawrence/src/cardano-lottery/work-backup
+ cp -f /home/lawrence/src/cardano-lottery/work/admin-utxo-valid.json /home/lawrence/src/cardano-lottery/work/admin-utxo.json /home/lawrence/src/cardano-lottery/work/init-tx-alonzo.body /home/lawrence/src/cardano-lottery/work/init-tx-alonzo.tx /home/lawrence/src/cardano-lottery/work/lotto-datum-in.json /home/lawrence/src/cardano-lottery/work/lotto-datum-out.json /home/lawrence/src/cardano-lottery/work/lotto-validator-utxo.json /home/lawrence/src/cardano-lottery/work/open-tx-alonzo.body /home/lawrence/src/cardano-lottery/work/open-tx-alonzo.tx /home/lawrence/src/cardano-lottery/work/pparms.json /home/lawrence/src/cardano-lottery/work-backup
+ /home/lawrence/.local/bin/cardano-cli query protocol-parameters --testnet-magic 42 --out-file /home/lawrence/src/cardano-lottery/work/pparms.json
+ lotto_validator_script=/home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-validator.plutus
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-validator.hash
+ lotto_validator_hash='{"bytes":"b8bc4a17d456851a457c520ef674275d469569160f57924b9ee7e345"}'
+ buy_validator_script=/home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/buy-validator.plutus
++ /home/lawrence/.local/bin/cardano-cli address build --payment-script-file /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-validator.plutus --testnet-magic 42
+ lotto_validator_script_addr=addr_test1wzutcjsh63tg2xj903fqaan5yaw5d9tfzc840yjtnmn7x3gzpqvuj
++ /home/lawrence/.local/bin/cardano-cli address build --payment-script-file /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/buy-validator.plutus --testnet-magic 42
+ buy_validator_script_addr=addr_test1wp7lkat7e0gd0g22gf3z7rva8uc9mnfcrhsec55eaqnzj7q6274ls
+ redeemer_file_path=/home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/redeemer-lotto-startbuy.json
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-val-addr.json
+ lotto_validator_addr='{"fields":[{"fields":[{"bytes":"b8bc4a17d456851a457c520ef674275d469569160f57924b9ee7e345"}],"constructor":1},{"fields":[],"constructor":1}],"constructor":0}'
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-token-name.json
++ jq -r .bytes
+ lotto_token_name=63ccb5f9d5b513f35693ca27db774839035772259c9b9c37c41343054d9da41e
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-token-value.json
+ lotto_token_value='{"map":[{"k":{"bytes":"aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b"},"v":{"map":[{"k":{"bytes":"63ccb5f9d5b513f35693ca27db774839035772259c9b9c37c41343054d9da41e"},"v":{"int":1}}]}}]}'
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/buy-val-addr.json
+ buy_validator_addr='{"fields":[{"fields":[{"bytes":"7dfb757ecbd0d7a14a42622f0d9d3f305dcd381de19c5299e8262978"}],"constructor":1},{"fields":[],"constructor":1}],"constructor":0}'
++ jq -r .bytes
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/buy-token-name.json
+ buy_token_name=ec9925d73a23474fc288bee2b07b84f762179b338b2b0e9397c0cde1c20515f7
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/buy-token-value.json
+ buy_token_value='{"map":[{"k":{"bytes":"aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b"},"v":{"map":[{"k":{"bytes":"ec9925d73a23474fc288bee2b07b84f762179b338b2b0e9397c0cde1c20515f7"},"v":{"int":1}}]}}]}'
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/ticket-policy.hash
++ jq -r .bytes
+ ticket_mph=32350c5781b4fa6649e3bf09e18fb9309b2fdc2ba58528fad93910db
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-thread-token-policy.hash
++ jq -r .bytes
+ thread_token_mph=aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b
++ cat /home/lawrence/.local/keys/devnet/01.pkh
+ admin_pkh=4ccdbf08ac0bd876fc9cf1ac03ed86ceef4052cde7a4989c59e87819
+ echo 'starting lotto start buy'
starting lotto start buy
++ /home/lawrence/.local/bin/cardano-cli address build --testnet-magic 42 --payment-verification-key-file /home/lawrence/.local/keys/devnet/01.vkey
+ admin_utxo_addr=addr_test1vpxvm0cg4s9asahunnc6cqldsm8w7szjehn6fxyut858sxgqvc3q5
+ /home/lawrence/.local/bin/cardano-cli query utxo --address addr_test1vpxvm0cg4s9asahunnc6cqldsm8w7szjehn6fxyut858sxgqvc3q5 --cardano-mode --testnet-magic 42 --out-file /home/lawrence/src/cardano-lottery/work/admin-utxo.json
+ cat /home/lawrence/src/cardano-lottery/work/admin-utxo.json
+ jq -r 'to_entries[] | select(.value.value.lovelace > 10000000 ) | .key'
+ readarray admin_utxo_valid_array
++ echo e975bd76f21d986d14ce78665283a088c3467ca41d99e3b6e2f9ce7416b892bc#0
++ tr -d '\n'
+ admin_utxo_in=e975bd76f21d986d14ce78665283a088c3467ca41d99e3b6e2f9ce7416b892bc#0
+ /home/lawrence/.local/bin/cardano-cli query utxo --address addr_test1wzutcjsh63tg2xj903fqaan5yaw5d9tfzc840yjtnmn7x3gzpqvuj --testnet-magic 42 --out-file /home/lawrence/src/cardano-lottery/work/lotto-validator-utxo.json
++ jq -r 'to_entries[]
| select(.value.value."aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b"."63ccb5f9d5b513f35693ca27db774839035772259c9b9c37c41343054d9da41e")
| .key' /home/lawrence/src/cardano-lottery/work/lotto-validator-utxo.json
+ lotto_validator_utxo_tx_in=e975bd76f21d986d14ce78665283a088c3467ca41d99e3b6e2f9ce7416b892bc#1
+ '[' devnet == devnet ']'
+ cp /home/lawrence/src/cardano-lottery/work/lotto-datum-out.json /home/lawrence/src/cardano-lottery/work/lotto-datum-in.json
+ cat /home/lawrence/src/cardano-lottery/work/lotto-datum-in.json
++ jq -r '.fields[2].int + .fields[4].int + .fields[5].int' /home/lawrence/src/cardano-lottery/work/lotto-datum-out.json
+ lotto_value=20000000
+ cp /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/buy-datum-startbuy.datum /home/lawrence/src/cardano-lottery/work/buy-datum-out.json
++ /home/lawrence/.local/bin/cardano-cli transaction hash-script-data --script-data-file /home/lawrence/src/cardano-lottery/work/buy-datum-out.json
+ buy_datum_hash=d771d060b152d0b277de91d5dd5bc6eb193f451d5399a50f6945a7d819e586a4
+ /home/lawrence/.local/bin/cardano-cli transaction build --alonzo-era --cardano-mode --testnet-magic 42 --tx-in e975bd76f21d986d14ce78665283a088c3467ca41d99e3b6e2f9ce7416b892bc#0 --tx-in e975bd76f21d986d14ce78665283a088c3467ca41d99e3b6e2f9ce7416b892bc#1 --tx-in-script-file /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-validator.plutus --tx-in-datum-file /home/lawrence/src/cardano-lottery/work/lotto-datum-in.json --tx-in-redeemer-file /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/redeemer-lotto-startbuy.json --tx-in-collateral 08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#2 --tx-out 'addr_test1wzutcjsh63tg2xj903fqaan5yaw5d9tfzc840yjtnmn7x3gzpqvuj+20000000 + 1 aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b.63ccb5f9d5b513f35693ca27db774839035772259c9b9c37c41343054d9da41e' --tx-out-datum-embed-file /home/lawrence/src/cardano-lottery/work/lotto-datum-out.json --tx-out 'addr_test1wp7lkat7e0gd0g22gf3z7rva8uc9mnfcrhsec55eaqnzj7q6274ls+2000000 + 1 aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b.ec9925d73a23474fc288bee2b07b84f762179b338b2b0e9397c0cde1c20515f7' --tx-out-datum-hash d771d060b152d0b277de91d5dd5bc6eb193f451d5399a50f6945a7d819e586a4 --change-address addr_test1vpxvm0cg4s9asahunnc6cqldsm8w7szjehn6fxyut858sxgqvc3q5 --required-signer-hash 4ccdbf08ac0bd876fc9cf1ac03ed86ceef4052cde7a4989c59e87819 --protocol-params-file /home/lawrence/src/cardano-lottery/work/pparms.json --out-file /home/lawrence/src/cardano-lottery/work/startbuy-tx-alonzo.body
Estimated transaction fee: Lovelace 536217
+ echo 'tx has been built'
tx has been built
+ /home/lawrence/.local/bin/cardano-cli transaction sign --tx-body-file /home/lawrence/src/cardano-lottery/work/startbuy-tx-alonzo.body --testnet-magic 42 --signing-key-file /home/lawrence/.local/keys/devnet/01.skey --out-file /home/lawrence/src/cardano-lottery/work/startbuy-tx-alonzo.tx
+ echo 'tx has been signed'
tx has been signed
+ echo 'Submit the tx with plutus script and wait 5 seconds...'
Submit the tx with plutus script and wait 5 seconds...
+ /home/lawrence/.local/bin/cardano-cli transaction submit --tx-file /home/lawrence/src/cardano-lottery/work/startbuy-tx-alonzo.tx --testnet-magic 42
Transaction successfully submitted.
[nix-shell:/home/lawrence/src/cardano-lottery]$ cardano-cli query utxo --address addr_test1wzutcjsh63tg2xj903fqaan5yaw5d9tfzc840yjtnmn7x3gzpqvuj --cardano-mode --testnet-magic 42
TxHash TxIx Amount
--------------------------------------------------------------------------------------
b69a615772a25bcdfecb9aee114ed50ad74a6cd2ff53a463d3349c4a2f56fb50 1 20000000 lovelace + 1 aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b.63ccb5f9d5b513f35693ca27db774839035772259c9b9c37c41343054d9da41e + TxOutDatumHash ScriptDataInAlonzoEra "34640eb34f0a1e61074d3866163b0ffd0f9026dadbc379690f076dc51b281a84"
+ '[' -z devnet ']'
+ ENV=devnet
+++ readlink -f ./buy-lotto-tx.sh
++ dirname /home/lawrence/src/cardano-lottery/scripts/cardano-cli/buy-lotto-tx.sh
+ MY_DIR=/home/lawrence/src/cardano-lottery/scripts/cardano-cli
+ source /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/global-export-variables.sh
++ set -e
++ set -o pipefail
++ export PROJECT_ID=
++ PROJECT_ID=
++ export BASE=/home/lawrence/src/cardano-lottery
++ BASE=/home/lawrence/src/cardano-lottery
++ export WORK=/home/lawrence/src/cardano-lottery/work
++ WORK=/home/lawrence/src/cardano-lottery/work
++ export CARDANO_CLI=/home/lawrence/.local/bin/cardano-cli
++ CARDANO_CLI=/home/lawrence/.local/bin/cardano-cli
++ export CARDANO_NODE_SOCKET_PATH=/home/lawrence/src/cardano-node/run/current/node-0/node.socket
++ CARDANO_NODE_SOCKET_PATH=/home/lawrence/src/cardano-node/run/current/node-0/node.socket
++ export TESTNET_MAGIC=42
++ TESTNET_MAGIC=42
++ export ADMIN_VKEY=/home/lawrence/.local/keys/devnet/01.vkey
++ ADMIN_VKEY=/home/lawrence/.local/keys/devnet/01.vkey
++ export ADMIN_SKEY=/home/lawrence/.local/keys/devnet/01.skey
++ ADMIN_SKEY=/home/lawrence/.local/keys/devnet/01.skey
++ export ADMIN_PKH=/home/lawrence/.local/keys/devnet/01.pkh
++ ADMIN_PKH=/home/lawrence/.local/keys/devnet/01.pkh
++ export PLAYER_VKEY=/home/lawrence/.local/keys/devnet/02.vkey
++ PLAYER_VKEY=/home/lawrence/.local/keys/devnet/02.vkey
++ export PLAYER_SKEY=/home/lawrence/.local/keys/devnet/02.skey
++ PLAYER_SKEY=/home/lawrence/.local/keys/devnet/02.skey
++ export PLAYER_PKH=/home/lawrence/.local/keys/devnet/02.pkh
++ PLAYER_PKH=/home/lawrence/.local/keys/devnet/02.pkh
++ export SPONSOR_VKEY=/home/lawrence/.local/keys/devnet/03.vkey
++ SPONSOR_VKEY=/home/lawrence/.local/keys/devnet/03.vkey
++ export SPONSOR_SKEY=/home/lawrence/.local/keys/devnet/03.skey
++ SPONSOR_SKEY=/home/lawrence/.local/keys/devnet/03.skey
++ export SPONSOR_PKH=/home/lawrence/.local/keys/devnet/03.pkh
++ SPONSOR_PKH=/home/lawrence/.local/keys/devnet/03.pkh
++ export MIN_ADA_OUTPUT_TX=2000000
++ MIN_ADA_OUTPUT_TX=2000000
++ export COLLATERAL_ADA=10000000
++ COLLATERAL_ADA=10000000
++ export ADMIN_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#2
++ ADMIN_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#2
++ export PLAYER_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#4
++ PLAYER_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#4
++ export SPONSOR_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#6
++ SPONSOR_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#6
+ echo 'Socket path: /home/lawrence/src/cardano-node/run/current/node-0/node.socket'
Socket path: /home/lawrence/src/cardano-node/run/current/node-0/node.socket
+ ls -al /home/lawrence/src/cardano-node/run/current/node-0/node.socket
srwxr-xr-x 1 lawrence lawrence 0 May 5 17:35 /home/lawrence/src/cardano-node/run/current/node-0/node.socket
+ mkdir -p /home/lawrence/src/cardano-lottery/work
+ mkdir -p /home/lawrence/src/cardano-lottery/work-backup
+ cp -f /home/lawrence/src/cardano-lottery/work/admin-utxo-valid.json /home/lawrence/src/cardano-lottery/work/admin-utxo.json /home/lawrence/src/cardano-lottery/work/buy-datum-out.json /home/lawrence/src/cardano-lottery/work/init-tx-alonzo.body /home/lawrence/src/cardano-lottery/work/init-tx-alonzo.tx /home/lawrence/src/cardano-lottery/work/lotto-datum-in.json /home/lawrence/src/cardano-lottery/work/lotto-datum-out.json /home/lawrence/src/cardano-lottery/work/lotto-validator-utxo.json /home/lawrence/src/cardano-lottery/work/open-tx-alonzo.body /home/lawrence/src/cardano-lottery/work/open-tx-alonzo.tx /home/lawrence/src/cardano-lottery/work/pparms.json /home/lawrence/src/cardano-lottery/work/startbuy-tx-alonzo.body /home/lawrence/src/cardano-lottery/work/startbuy-tx-alonzo.tx /home/lawrence/src/cardano-lottery/work-backup
+ /home/lawrence/.local/bin/cardano-cli query protocol-parameters --testnet-magic 42 --out-file /home/lawrence/src/cardano-lottery/work/pparms.json
+ lotto_validator_script=/home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-validator.plutus
+ buy_validator_script=/home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/buy-validator.plutus
+ minting_script=/home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/ticket-policy.plutus
++ /home/lawrence/.local/bin/cardano-cli address build --payment-script-file /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-validator.plutus --testnet-magic 42
+ lotto_validator_script_addr=addr_test1wzutcjsh63tg2xj903fqaan5yaw5d9tfzc840yjtnmn7x3gzpqvuj
++ /home/lawrence/.local/bin/cardano-cli address build --payment-script-file /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/buy-validator.plutus --testnet-magic 42
+ buy_validator_script_addr=addr_test1wp7lkat7e0gd0g22gf3z7rva8uc9mnfcrhsec55eaqnzj7q6274ls
+ redeemer_file_path=/home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/redeemer-buy-ticket.json
+ redeemer_mint_file_path=/home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/redeemer-ticket-mint.json
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/buy-val-addr.json
+ buy_validator_addr='{"fields":[{"fields":[{"bytes":"7dfb757ecbd0d7a14a42622f0d9d3f305dcd381de19c5299e8262978"}],"constructor":1},{"fields":[],"constructor":1}],"constructor":0}'
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/buy-token-name.json
++ jq -r .bytes
+ buy_token_name=ec9925d73a23474fc288bee2b07b84f762179b338b2b0e9397c0cde1c20515f7
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/buy-token-value.json
+ buy_token_value='{"map":[{"k":{"bytes":"aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b"},"v":{"map":[{"k":{"bytes":"ec9925d73a23474fc288bee2b07b84f762179b338b2b0e9397c0cde1c20515f7"},"v":{"int":1}}]}}]}'
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/ticket-policy.hash
++ jq -r .bytes
+ ticket_mph=32350c5781b4fa6649e3bf09e18fb9309b2fdc2ba58528fad93910db
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-thread-token-policy.hash
++ jq -r .bytes
+ thread_token_mph=aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b
++ cat /home/lawrence/.local/keys/devnet/02.pkh
+ player_pkh=af7a5b4a636f9ee1a4f8443a189ab7da4fdc799821bf5637e7e689d3
+ echo 'starting lotto buy'
starting lotto buy
++ /home/lawrence/.local/bin/cardano-cli address build --testnet-magic 42 --payment-verification-key-file /home/lawrence/.local/keys/devnet/02.vkey
+ player_addr=addr_test1vzhh5k62vdheacdylpzr5xy6kldylhrenqsm743hulngn5c34khju
+ /home/lawrence/.local/bin/cardano-cli query utxo --address addr_test1vzhh5k62vdheacdylpzr5xy6kldylhrenqsm743hulngn5c34khju --testnet-magic 42 --out-file /home/lawrence/src/cardano-lottery/work/player-utxo.json
+ cat /home/lawrence/src/cardano-lottery/work/player-utxo.json
+ jq -r 'to_entries[] | select(.value.value.lovelace > 10000000 ) | .key'
+ readarray player_utxo_valid_array
++ echo 08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#3
++ tr -d '\n'
+ player_utxo_in=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#3
+ /home/lawrence/.local/bin/cardano-cli query utxo --address addr_test1wp7lkat7e0gd0g22gf3z7rva8uc9mnfcrhsec55eaqnzj7q6274ls --testnet-magic 42 --out-file /home/lawrence/src/cardano-lottery/work/buy-validator-utxo.json
++ jq -r 'to_entries[]
| select(.value.value."aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b"."ec9925d73a23474fc288bee2b07b84f762179b338b2b0e9397c0cde1c20515f7")
| .key' /home/lawrence/src/cardano-lottery/work/buy-validator-utxo.json
+ buy_validator_utxo_tx_in=b69a615772a25bcdfecb9aee114ed50ad74a6cd2ff53a463d3349c4a2f56fb50#2
+ '[' devnet == devnet ']'
+ cp /home/lawrence/src/cardano-lottery/work/lotto-datum-out.json /home/lawrence/src/cardano-lottery/work/lotto-datum-in.json
+ cp /home/lawrence/src/cardano-lottery/work/buy-datum-out.json /home/lawrence/src/cardano-lottery/work/buy-datum-in.json
++ jq -r '.fields[0].fields[8].int' /home/lawrence/src/cardano-lottery/work/lotto-datum-in.json
+ ticket_cost=20000
++ jq -r '.fields[3].int' /home/lawrence/src/cardano-lottery/work/lotto-datum-in.json
+ seq_num=1
+ ticket_num=10
++ echo -n 10
++ xxd -ps
+ ticket_num_hex=3130
++ jq -r '.fields[0].int' /home/lawrence/src/cardano-lottery/work/buy-datum-in.json
+ ticket_total=0
++ jq -r '.fields[1].int' /home/lawrence/src/cardano-lottery/work/buy-datum-in.json
+ total_value=2000000
+ new_ticket_total=1
+ new_total_value=4000000
+ cat /home/lawrence/src/cardano-lottery/work/buy-datum-in.json
+ jq -c '
.fields[0].int |= 1
| .fields[1].int |= 4000000'
+ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/redeemer-ticket-mint.json
+ jq -c '
.fields[0].constructor |= 1
| .fields[1].bytes |= "3130"'
+ /home/lawrence/.local/bin/cardano-cli transaction build --alonzo-era --cardano-mode --testnet-magic 42 --tx-in 08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#3 --tx-in b69a615772a25bcdfecb9aee114ed50ad74a6cd2ff53a463d3349c4a2f56fb50#2 --tx-in-script-file /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/buy-validator.plutus --tx-in-datum-file /home/lawrence/src/cardano-lottery/work/buy-datum-in.json --tx-in-redeemer-file /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/redeemer-buy-ticket.json --mint-script-file /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/ticket-policy.plutus --mint-redeemer-file /home/lawrence/src/cardano-lottery/work/redeemer-ticket-mint.json --tx-in-collateral 08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#4 --tx-out 'addr_test1wp7lkat7e0gd0g22gf3z7rva8uc9mnfcrhsec55eaqnzj7q6274ls+4000000 + 1 aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b.ec9925d73a23474fc288bee2b07b84f762179b338b2b0e9397c0cde1c20515f7' --tx-out-datum-embed-file /home/lawrence/src/cardano-lottery/work/buy-datum-out.json --tx-out 'addr_test1vzhh5k62vdheacdylpzr5xy6kldylhrenqsm743hulngn5c34khju+2000000 + 1 32350c5781b4fa6649e3bf09e18fb9309b2fdc2ba58528fad93910db.3130' --change-address addr_test1vzhh5k62vdheacdylpzr5xy6kldylhrenqsm743hulngn5c34khju --mint '1 32350c5781b4fa6649e3bf09e18fb9309b2fdc2ba58528fad93910db.3130' --protocol-params-file /home/lawrence/src/cardano-lottery/work/pparms.json --out-file /home/lawrence/src/cardano-lottery/work/buy-tx-alonzo.body
Estimated transaction fee: Lovelace 332037
+ echo 'tx has been built'
tx has been built
+ /home/lawrence/.local/bin/cardano-cli transaction sign --tx-body-file /home/lawrence/src/cardano-lottery/work/buy-tx-alonzo.body --testnet-magic 42 --signing-key-file /home/lawrence/.local/keys/devnet/02.skey --out-file /home/lawrence/src/cardano-lottery/work/buy-tx-alonzo.tx
+ echo 'tx has been signed'
tx has been signed
+ echo 'Submit the tx with plutus script and wait 5 seconds...'
Submit the tx with plutus script and wait 5 seconds...
+ /home/lawrence/.local/bin/cardano-cli transaction submit --tx-file /home/lawrence/src/cardano-lottery/work/buy-tx-alonzo.tx --testnet-magic 42
Transaction successfully submitted.
[nix-shell:/home/lawrence/src/cardano-lottery]$ cardano-cli query utxo --address addr_test1wp7lkat7e0gd0g22gf3z7rva8uc9mnfcrhsec55eaqnzj7q6274ls --cardano-mode --testnet-magic 42
TxHash TxIx Amount
--------------------------------------------------------------------------------------
544520ba999311f5f34c886a4418952c410eaf3f1c11bf826a82d653afee9ae7 1 4000000 lovelace + 1 aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b.ec9925d73a23474fc288bee2b07b84f762179b338b2b0e9397c0cde1c20515f7 + TxOutDatumHash ScriptDataInAlonzoEra "632de650457288ebb506cf1d7784fdb0344f4361e9666bb6eea840df819d1e7d"
+++ readlink -f ./transfertoken-lotto-tx.sh
++ dirname /home/lawrence/src/cardano-lottery/scripts/cardano-cli/transfertoken-lotto-tx.sh
+ MY_DIR=/home/lawrence/src/cardano-lottery/scripts/cardano-cli
+ source /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/global-export-variables.sh
++ set -e
++ set -o pipefail
++ export PROJECT_ID=
++ PROJECT_ID=
++ export BASE=/home/lawrence/src/cardano-lottery
++ BASE=/home/lawrence/src/cardano-lottery
++ export WORK=/home/lawrence/src/cardano-lottery/work
++ WORK=/home/lawrence/src/cardano-lottery/work
++ export CARDANO_CLI=/home/lawrence/.local/bin/cardano-cli
++ CARDANO_CLI=/home/lawrence/.local/bin/cardano-cli
++ export CARDANO_NODE_SOCKET_PATH=/home/lawrence/src/cardano-node/run/current/node-0/node.socket
++ CARDANO_NODE_SOCKET_PATH=/home/lawrence/src/cardano-node/run/current/node-0/node.socket
++ export TESTNET_MAGIC=42
++ TESTNET_MAGIC=42
++ export ADMIN_VKEY=/home/lawrence/.local/keys/devnet/01.vkey
++ ADMIN_VKEY=/home/lawrence/.local/keys/devnet/01.vkey
++ export ADMIN_SKEY=/home/lawrence/.local/keys/devnet/01.skey
++ ADMIN_SKEY=/home/lawrence/.local/keys/devnet/01.skey
++ export ADMIN_PKH=/home/lawrence/.local/keys/devnet/01.pkh
++ ADMIN_PKH=/home/lawrence/.local/keys/devnet/01.pkh
++ export PLAYER_VKEY=/home/lawrence/.local/keys/devnet/02.vkey
++ PLAYER_VKEY=/home/lawrence/.local/keys/devnet/02.vkey
++ export PLAYER_SKEY=/home/lawrence/.local/keys/devnet/02.skey
++ PLAYER_SKEY=/home/lawrence/.local/keys/devnet/02.skey
++ export PLAYER_PKH=/home/lawrence/.local/keys/devnet/02.pkh
++ PLAYER_PKH=/home/lawrence/.local/keys/devnet/02.pkh
++ export SPONSOR_VKEY=/home/lawrence/.local/keys/devnet/03.vkey
++ SPONSOR_VKEY=/home/lawrence/.local/keys/devnet/03.vkey
++ export SPONSOR_SKEY=/home/lawrence/.local/keys/devnet/03.skey
++ SPONSOR_SKEY=/home/lawrence/.local/keys/devnet/03.skey
++ export SPONSOR_PKH=/home/lawrence/.local/keys/devnet/03.pkh
++ SPONSOR_PKH=/home/lawrence/.local/keys/devnet/03.pkh
++ export MIN_ADA_OUTPUT_TX=2000000
++ MIN_ADA_OUTPUT_TX=2000000
++ export COLLATERAL_ADA=10000000
++ COLLATERAL_ADA=10000000
++ export ADMIN_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#2
++ ADMIN_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#2
++ export PLAYER_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#4
++ PLAYER_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#4
++ export SPONSOR_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#6
++ SPONSOR_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#6
+ echo 'Socket path: /home/lawrence/src/cardano-node/run/current/node-0/node.socket'
Socket path: /home/lawrence/src/cardano-node/run/current/node-0/node.socket
+ ls -al /home/lawrence/src/cardano-node/run/current/node-0/node.socket
srwxr-xr-x 1 lawrence lawrence 0 May 5 17:35 /home/lawrence/src/cardano-node/run/current/node-0/node.socket
+ mkdir -p /home/lawrence/src/cardano-lottery/work
+ mkdir -p /home/lawrence/src/cardano-lottery/work-backup
+ cp -f /home/lawrence/src/cardano-lottery/work/admin-utxo-valid.json /home/lawrence/src/cardano-lottery/work/admin-utxo.json /home/lawrence/src/cardano-lottery/work/buy-datum-in.json /home/lawrence/src/cardano-lottery/work/buy-datum-out.json /home/lawrence/src/cardano-lottery/work/buy-tx-alonzo.body /home/lawrence/src/cardano-lottery/work/buy-tx-alonzo.tx /home/lawrence/src/cardano-lottery/work/buy-validator-utxo.json /home/lawrence/src/cardano-lottery/work/init-tx-alonzo.body /home/lawrence/src/cardano-lottery/work/init-tx-alonzo.tx /home/lawrence/src/cardano-lottery/work/lotto-datum-in.json /home/lawrence/src/cardano-lottery/work/lotto-datum-out.json /home/lawrence/src/cardano-lottery/work/lotto-validator-utxo.json /home/lawrence/src/cardano-lottery/work/open-tx-alonzo.body /home/lawrence/src/cardano-lottery/work/open-tx-alonzo.tx /home/lawrence/src/cardano-lottery/work/player-utxo-valid.json /home/lawrence/src/cardano-lottery/work/player-utxo.json /home/lawrence/src/cardano-lottery/work/pparms.json /home/lawrence/src/cardano-lottery/work/redeemer-ticket-mint.json /home/lawrence/src/cardano-lottery/work/startbuy-tx-alonzo.body /home/lawrence/src/cardano-lottery/work/startbuy-tx-alonzo.tx /home/lawrence/src/cardano-lottery/work-backup
+ /home/lawrence/.local/bin/cardano-cli query protocol-parameters --testnet-magic 42 --out-file /home/lawrence/src/cardano-lottery/work/pparms.json
+ lotto_validator_script=/home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-validator.plutus
+ buy_validator_script=/home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/buy-validator.plutus
++ /home/lawrence/.local/bin/cardano-cli address build --payment-script-file /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-validator.plutus --testnet-magic 42
+ lotto_validator_script_addr=addr_test1wzutcjsh63tg2xj903fqaan5yaw5d9tfzc840yjtnmn7x3gzpqvuj
++ /home/lawrence/.local/bin/cardano-cli address build --payment-script-file /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/buy-validator.plutus --testnet-magic 42
+ buy_validator_script_addr=addr_test1wp7lkat7e0gd0g22gf3z7rva8uc9mnfcrhsec55eaqnzj7q6274ls
+ buy_redeemer_file_path=/home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/redeemer-buy-transfertoken.json
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/buy-token-name.json
++ jq -r .bytes
+ buy_token_name=ec9925d73a23474fc288bee2b07b84f762179b338b2b0e9397c0cde1c20515f7
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-thread-token-policy.hash
++ jq -r .bytes
+ thread_token_mph=aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b
++ cat /home/lawrence/.local/keys/devnet/01.pkh
+ admin_pkh=4ccdbf08ac0bd876fc9cf1ac03ed86ceef4052cde7a4989c59e87819
+ echo 'starting transfer token'
starting transfer token
++ /home/lawrence/.local/bin/cardano-cli address build --testnet-magic 42 --payment-verification-key-file /home/lawrence/.local/keys/devnet/01.vkey
+ admin_utxo_addr=addr_test1vpxvm0cg4s9asahunnc6cqldsm8w7szjehn6fxyut858sxgqvc3q5
+ /home/lawrence/.local/bin/cardano-cli query utxo --address addr_test1vpxvm0cg4s9asahunnc6cqldsm8w7szjehn6fxyut858sxgqvc3q5 --cardano-mode --testnet-magic 42 --out-file /home/lawrence/src/cardano-lottery/work/admin-utxo.json
+ cat /home/lawrence/src/cardano-lottery/work/admin-utxo.json
+ jq -r 'to_entries[] | select(.value.value.lovelace > 10000000 ) | .key'
+ readarray admin_utxo_valid_array
++ echo b69a615772a25bcdfecb9aee114ed50ad74a6cd2ff53a463d3349c4a2f56fb50#0
++ tr -d '\n'
+ admin_utxo_in=b69a615772a25bcdfecb9aee114ed50ad74a6cd2ff53a463d3349c4a2f56fb50#0
+ /home/lawrence/.local/bin/cardano-cli query utxo --address addr_test1wp7lkat7e0gd0g22gf3z7rva8uc9mnfcrhsec55eaqnzj7q6274ls --testnet-magic 42 --out-file /home/lawrence/src/cardano-lottery/work/buy-validator-utxo.json
++ jq -r 'to_entries[]
| select(.value.value."aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b"."ec9925d73a23474fc288bee2b07b84f762179b338b2b0e9397c0cde1c20515f7")
| .key' /home/lawrence/src/cardano-lottery/work/buy-validator-utxo.json
+ buy_validator_utxo_tx_in=ad95026178255b3dff4a4cf866e54cb18689247a5906e440c1978d89a777cb65#1
+ '[' devnet == devnet ']'
+ cp /home/lawrence/src/cardano-lottery/work/buy-datum-out.json /home/lawrence/src/cardano-lottery/work/buy-datum-in.json
++ jq -r '.fields[1].int ' /home/lawrence/src/cardano-lottery/work/buy-datum-in.json
+ buy_total_value=22000000
+ cp /home/lawrence/src/cardano-lottery/work/buy-datum-in.json /home/lawrence/src/cardano-lottery/work/buy-datum-out.json
+ /home/lawrence/.local/bin/cardano-cli transaction build --alonzo-era --cardano-mode --testnet-magic 42 --tx-in b69a615772a25bcdfecb9aee114ed50ad74a6cd2ff53a463d3349c4a2f56fb50#0 --tx-in ad95026178255b3dff4a4cf866e54cb18689247a5906e440c1978d89a777cb65#1 --tx-in-script-file /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/buy-validator.plutus --tx-in-datum-file /home/lawrence/src/cardano-lottery/work/buy-datum-in.json --tx-in-redeemer-file /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/redeemer-buy-transfertoken.json --tx-in-collateral 08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#2 --tx-out 'addr_test1wzutcjsh63tg2xj903fqaan5yaw5d9tfzc840yjtnmn7x3gzpqvuj+22000000 + 1 aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b.ec9925d73a23474fc288bee2b07b84f762179b338b2b0e9397c0cde1c20515f7' --tx-out-datum-embed-file /home/lawrence/src/cardano-lottery/work/lotto-datum-out.json --change-address addr_test1vpxvm0cg4s9asahunnc6cqldsm8w7szjehn6fxyut858sxgqvc3q5 --required-signer-hash 4ccdbf08ac0bd876fc9cf1ac03ed86ceef4052cde7a4989c59e87819 --protocol-params-file /home/lawrence/src/cardano-lottery/work/pparms.json --out-file /home/lawrence/src/cardano-lottery/work/transfertoken-tx-alonzo.body
Estimated transaction fee: Lovelace 116503
+ echo 'tx has been built'
tx has been built
+ /home/lawrence/.local/bin/cardano-cli transaction sign --tx-body-file /home/lawrence/src/cardano-lottery/work/transfertoken-tx-alonzo.body --testnet-magic 42 --signing-key-file /home/lawrence/.local/keys/devnet/01.skey --out-file /home/lawrence/src/cardano-lottery/work/transfertoken-tx-alonzo.tx
+ echo 'tx has been signed'
tx has been signed
+ echo 'Submit the tx with plutus script and wait 5 seconds...'
Submit the tx with plutus script and wait 5 seconds...
+ /home/lawrence/.local/bin/cardano-cli transaction submit --tx-file /home/lawrence/src/cardano-lottery/work/transfertoken-tx-alonzo.tx --testnet-magic 42
Transaction successfully submitted.
[nix-shell:/home/lawrence/src/cardano-lottery]$ cardano-cli query utxo --address addr_test1wp7lkat7e0gd0g22gf3z7rva8uc9mnfcrhsec55eaqnzj7q6274ls --cardano-mode --testnet-magic 42
TxHash TxIx Amount
--------------------------------------------------------------------------------------
ad95026178255b3dff4a4cf866e54cb18689247a5906e440c1978d89a777cb65 1 22000000 lovelace + 1 aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b.ec9925d73a23474fc288bee2b07b84f762179b338b2b0e9397c0cde1c20515f7 + TxOutDatumHash ScriptDataInAlonzoEra "6a2883e482735834b832b8154328342508548659115343418a955388bda9a438"
[nix-shell:/home/lawrence/src/cardano-lottery]$ cardano-cli query utxo --address addr_test1wp7lkat7e0gd0g22gf3z7rva8uc9mnfcrhsec55eaqnzj7q6274ls --cardano-mode --testnet-magic 42
TxHash TxIx Amount
--------------------------------------------------------------------------------------
+ '[' -z devnet ']'
+ ENV=devnet
+++ readlink -f ./stopbuy-lotto-tx.sh
++ dirname /home/lawrence/src/cardano-lottery/scripts/cardano-cli/stopbuy-lotto-tx.sh
+ MY_DIR=/home/lawrence/src/cardano-lottery/scripts/cardano-cli
+ source /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/global-export-variables.sh
++ set -e
++ set -o pipefail
++ export PROJECT_ID=
++ PROJECT_ID=
++ export BASE=/home/lawrence/src/cardano-lottery
++ BASE=/home/lawrence/src/cardano-lottery
++ export WORK=/home/lawrence/src/cardano-lottery/work
++ WORK=/home/lawrence/src/cardano-lottery/work
++ export CARDANO_CLI=/home/lawrence/.local/bin/cardano-cli
++ CARDANO_CLI=/home/lawrence/.local/bin/cardano-cli
++ export CARDANO_NODE_SOCKET_PATH=/home/lawrence/src/cardano-node/run/current/node-0/node.socket
++ CARDANO_NODE_SOCKET_PATH=/home/lawrence/src/cardano-node/run/current/node-0/node.socket
++ export TESTNET_MAGIC=42
++ TESTNET_MAGIC=42
++ export ADMIN_VKEY=/home/lawrence/.local/keys/devnet/01.vkey
++ ADMIN_VKEY=/home/lawrence/.local/keys/devnet/01.vkey
++ export ADMIN_SKEY=/home/lawrence/.local/keys/devnet/01.skey
++ ADMIN_SKEY=/home/lawrence/.local/keys/devnet/01.skey
++ export ADMIN_PKH=/home/lawrence/.local/keys/devnet/01.pkh
++ ADMIN_PKH=/home/lawrence/.local/keys/devnet/01.pkh
++ export PLAYER_VKEY=/home/lawrence/.local/keys/devnet/02.vkey
++ PLAYER_VKEY=/home/lawrence/.local/keys/devnet/02.vkey
++ export PLAYER_SKEY=/home/lawrence/.local/keys/devnet/02.skey
++ PLAYER_SKEY=/home/lawrence/.local/keys/devnet/02.skey
++ export PLAYER_PKH=/home/lawrence/.local/keys/devnet/02.pkh
++ PLAYER_PKH=/home/lawrence/.local/keys/devnet/02.pkh
++ export SPONSOR_VKEY=/home/lawrence/.local/keys/devnet/03.vkey
++ SPONSOR_VKEY=/home/lawrence/.local/keys/devnet/03.vkey
++ export SPONSOR_SKEY=/home/lawrence/.local/keys/devnet/03.skey
++ SPONSOR_SKEY=/home/lawrence/.local/keys/devnet/03.skey
++ export SPONSOR_PKH=/home/lawrence/.local/keys/devnet/03.pkh
++ SPONSOR_PKH=/home/lawrence/.local/keys/devnet/03.pkh
++ export MIN_ADA_OUTPUT_TX=2000000
++ MIN_ADA_OUTPUT_TX=2000000
++ export COLLATERAL_ADA=10000000
++ COLLATERAL_ADA=10000000
++ export ADMIN_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#2
++ ADMIN_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#2
++ export PLAYER_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#4
++ PLAYER_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#4
++ export SPONSOR_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#6
++ SPONSOR_COLLATERAL=08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#6
+ echo 'Socket path: /home/lawrence/src/cardano-node/run/current/node-0/node.socket'
Socket path: /home/lawrence/src/cardano-node/run/current/node-0/node.socket
+ ls -al /home/lawrence/src/cardano-node/run/current/node-0/node.socket
srwxr-xr-x 1 lawrence lawrence 0 May 5 17:35 /home/lawrence/src/cardano-node/run/current/node-0/node.socket
+ mkdir -p /home/lawrence/src/cardano-lottery/work
+ mkdir -p /home/lawrence/src/cardano-lottery/work-backup
+ cp -f /home/lawrence/src/cardano-lottery/work/admin-utxo-valid.json /home/lawrence/src/cardano-lottery/work/admin-utxo.json /home/lawrence/src/cardano-lottery/work/buy-datum-in.json /home/lawrence/src/cardano-lottery/work/buy-datum-out.json /home/lawrence/src/cardano-lottery/work/buy-tx-alonzo.body /home/lawrence/src/cardano-lottery/work/buy-tx-alonzo.tx /home/lawrence/src/cardano-lottery/work/buy-validator-utxo.json /home/lawrence/src/cardano-lottery/work/init-tx-alonzo.body /home/lawrence/src/cardano-lottery/work/init-tx-alonzo.tx /home/lawrence/src/cardano-lottery/work/lotto-datum-in.json /home/lawrence/src/cardano-lottery/work/lotto-datum-out.json /home/lawrence/src/cardano-lottery/work/lotto-validator-utxo.json /home/lawrence/src/cardano-lottery/work/open-tx-alonzo.body /home/lawrence/src/cardano-lottery/work/open-tx-alonzo.tx /home/lawrence/src/cardano-lottery/work/player-utxo-valid.json /home/lawrence/src/cardano-lottery/work/player-utxo.json /home/lawrence/src/cardano-lottery/work/pparms.json /home/lawrence/src/cardano-lottery/work/redeemer-ticket-mint.json /home/lawrence/src/cardano-lottery/work/startbuy-tx-alonzo.body /home/lawrence/src/cardano-lottery/work/startbuy-tx-alonzo.tx /home/lawrence/src/cardano-lottery/work/transfertoken-tx-alonzo.body /home/lawrence/src/cardano-lottery/work/transfertoken-tx-alonzo.tx /home/lawrence/src/cardano-lottery/work-backup
+ /home/lawrence/.local/bin/cardano-cli query protocol-parameters --testnet-magic 42 --out-file /home/lawrence/src/cardano-lottery/work/pparms.json
+ lotto_validator_script=/home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-validator.plutus
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-validator.hash
+ lotto_validator_hash='{"bytes":"b8bc4a17d456851a457c520ef674275d469569160f57924b9ee7e345"}'
+ buy_validator_script=/home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/buy-validator.plutus
++ /home/lawrence/.local/bin/cardano-cli address build --payment-script-file /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-validator.plutus --testnet-magic 42
+ lotto_validator_script_addr=addr_test1wzutcjsh63tg2xj903fqaan5yaw5d9tfzc840yjtnmn7x3gzpqvuj
++ /home/lawrence/.local/bin/cardano-cli address build --payment-script-file /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/buy-validator.plutus --testnet-magic 42
+ buy_validator_script_addr=addr_test1wp7lkat7e0gd0g22gf3z7rva8uc9mnfcrhsec55eaqnzj7q6274ls
+ lotto_redeemer_file_path=/home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/redeemer-lotto-stopbuy.json
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-token-name.json
++ jq -r .bytes
+ lotto_token_name=63ccb5f9d5b513f35693ca27db774839035772259c9b9c37c41343054d9da41e
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-token-value.json
+ lotto_token_value='{"map":[{"k":{"bytes":"aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b"},"v":{"map":[{"k":{"bytes":"63ccb5f9d5b513f35693ca27db774839035772259c9b9c37c41343054d9da41e"},"v":{"int":1}}]}}]}'
+ buy_redeemer_file_path=/home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/redeemer-buy-transfertoken.json
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/buy-token-name.json
++ jq -r .bytes
+ buy_token_name=ec9925d73a23474fc288bee2b07b84f762179b338b2b0e9397c0cde1c20515f7
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/buy-token-value.json
+ buy_token_value='{"map":[{"k":{"bytes":"aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b"},"v":{"map":[{"k":{"bytes":"ec9925d73a23474fc288bee2b07b84f762179b338b2b0e9397c0cde1c20515f7"},"v":{"int":1}}]}}]}'
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-thread-token-policy.hash
++ jq -r .bytes
+ thread_token_mph=aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b
++ cat /home/lawrence/.local/keys/devnet/01.pkh
+ admin_pkh=4ccdbf08ac0bd876fc9cf1ac03ed86ceef4052cde7a4989c59e87819
+ echo 'starting lotto stop buy'
starting lotto stop buy
++ /home/lawrence/.local/bin/cardano-cli address build --testnet-magic 42 --payment-verification-key-file /home/lawrence/.local/keys/devnet/01.vkey
+ admin_utxo_addr=addr_test1vpxvm0cg4s9asahunnc6cqldsm8w7szjehn6fxyut858sxgqvc3q5
+ /home/lawrence/.local/bin/cardano-cli query utxo --address addr_test1vpxvm0cg4s9asahunnc6cqldsm8w7szjehn6fxyut858sxgqvc3q5 --cardano-mode --testnet-magic 42 --out-file /home/lawrence/src/cardano-lottery/work/admin-utxo.json
+ cat /home/lawrence/src/cardano-lottery/work/admin-utxo.json
+ jq -r 'to_entries[] | select(.value.value.lovelace > 10000000 ) | .key'
+ readarray admin_utxo_valid_array
++ echo 7accfbb492f661de932c3c0e6daa391545cf81ca5e89497281880a6728481f0e#0
++ tr -d '\n'
+ admin_utxo_in=7accfbb492f661de932c3c0e6daa391545cf81ca5e89497281880a6728481f0e#0
+ /home/lawrence/.local/bin/cardano-cli query utxo --address addr_test1wzutcjsh63tg2xj903fqaan5yaw5d9tfzc840yjtnmn7x3gzpqvuj --testnet-magic 42 --out-file /home/lawrence/src/cardano-lottery/work/lotto-validator-utxo.json
++ jq -r 'to_entries[]
| select(.value.value."aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b"."63ccb5f9d5b513f35693ca27db774839035772259c9b9c37c41343054d9da41e")
| .key' /home/lawrence/src/cardano-lottery/work/lotto-validator-utxo.json
+ lotto_validator_utxo_tx_in_0=b69a615772a25bcdfecb9aee114ed50ad74a6cd2ff53a463d3349c4a2f56fb50#1
++ jq -r 'to_entries[]
| select(.value.value."aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b"."ec9925d73a23474fc288bee2b07b84f762179b338b2b0e9397c0cde1c20515f7")
| .key' /home/lawrence/src/cardano-lottery/work/lotto-validator-utxo.json
+ lotto_validator_utxo_tx_in_1=7accfbb492f661de932c3c0e6daa391545cf81ca5e89497281880a6728481f0e#1
++ jq -r 'to_entries[]
| select(.value.value."aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b"."ec9925d73a23474fc288bee2b07b84f762179b338b2b0e9397c0cde1c20515f7")
| .value.value.lovelace' /home/lawrence/src/cardano-lottery/work/lotto-validator-utxo.json
+ buy_total_value=22000000
+ '[' devnet == devnet ']'
+ cp /home/lawrence/src/cardano-lottery/work/lotto-datum-out.json /home/lawrence/src/cardano-lottery/work/lotto-datum-in.json
+ cp /home/lawrence/src/cardano-lottery/work/buy-datum-out.json /home/lawrence/src/cardano-lottery/work/buy-datum-in.json
++ jq -r '.fields[2].int' /home/lawrence/src/cardano-lottery/work/lotto-datum-in.json
+ jackpot=20000000
++ jq -r '.fields[4].int' /home/lawrence/src/cardano-lottery/work/lotto-datum-in.json
+ treasury=0
++ jq -r '.fields[5].int' /home/lawrence/src/cardano-lottery/work/lotto-datum-in.json
+ fees=0
++ jq -r '.fields[0].fields[7].int' /home/lawrence/src/cardano-lottery/work/lotto-datum-in.json
+ percentFees=2
+ new_jackpot=30780000
+ new_treasury=10780000
+ new_fees=440000
+ cat /home/lawrence/src/cardano-lottery/work/lotto-datum-in.json
+ jq -c '
.fields[2].int |= 30780000
| .fields[4].int |= 10780000
| .fields[5].int |= 440000'
++ jq -r '.fields[2].int + .fields[4].int + .fields[5].int' /home/lawrence/src/cardano-lottery/work/lotto-datum-out.json
+ lotto_value=42000000
+ /home/lawrence/.local/bin/cardano-cli transaction build --alonzo-era --cardano-mode --testnet-magic 42 --tx-in 7accfbb492f661de932c3c0e6daa391545cf81ca5e89497281880a6728481f0e#0 --tx-in b69a615772a25bcdfecb9aee114ed50ad74a6cd2ff53a463d3349c4a2f56fb50#1 --tx-in-script-file /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-validator.plutus --tx-in-datum-file /home/lawrence/src/cardano-lottery/work/lotto-datum-in.json --tx-in-redeemer-file /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/redeemer-lotto-stopbuy.json --tx-in 7accfbb492f661de932c3c0e6daa391545cf81ca5e89497281880a6728481f0e#1 --tx-in-script-file /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-validator.plutus --tx-in-datum-file /home/lawrence/src/cardano-lottery/work/lotto-datum-in.json --tx-in-redeemer-file /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/redeemer-lotto-stopbuy.json --tx-in-collateral 08fd4e5e62df3d9a2439b5095e15d83a81b9ad8f8d55d4f4fe483c86756eec4d#2 --tx-out 'addr_test1wzutcjsh63tg2xj903fqaan5yaw5d9tfzc840yjtnmn7x3gzpqvuj+42000000 + 1 aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b.63ccb5f9d5b513f35693ca27db774839035772259c9b9c37c41343054d9da41e + 1 aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b.ec9925d73a23474fc288bee2b07b84f762179b338b2b0e9397c0cde1c20515f7' --tx-out-datum-embed-file /home/lawrence/src/cardano-lottery/work/lotto-datum-out.json --change-address addr_test1vpxvm0cg4s9asahunnc6cqldsm8w7szjehn6fxyut858sxgqvc3q5 --required-signer-hash 4ccdbf08ac0bd876fc9cf1ac03ed86ceef4052cde7a4989c59e87819 --protocol-params-file /home/lawrence/src/cardano-lottery/work/pparms.json --out-file /home/lawrence/src/cardano-lottery/work/stopbuy-tx-alonzo.body
Estimated transaction fee: Lovelace 1304443
+ echo 'tx has been built'
tx has been built
+ /home/lawrence/.local/bin/cardano-cli transaction sign --tx-body-file /home/lawrence/src/cardano-lottery/work/stopbuy-tx-alonzo.body --testnet-magic 42 --signing-key-file /home/lawrence/.local/keys/devnet/01.skey --out-file /home/lawrence/src/cardano-lottery/work/stopbuy-tx-alonzo.tx
+ echo 'tx has been signed'
tx has been signed
+ echo 'Submit the tx with plutus script and wait 5 seconds...'
Submit the tx with plutus script and wait 5 seconds...
+ /home/lawrence/.local/bin/cardano-cli transaction submit --tx-file /home/lawrence/src/cardano-lottery/work/stopbuy-tx-alonzo.tx --testnet-magic 42
Command failed: transaction submit Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (ExUnitsTooBigUTxO (WrapExUnits {unWrapExUnits = ExUnits' {exUnitsMem' = 10000000, exUnitsSteps' = 10000000000}}) (WrapExUnits {unWrapExUnits = ExUnits' {exUnitsMem' = 15626298, exUnitsSteps' = 5586760844}}))))])
[nix-shell:~/src/cardano-lottery]$ cardano-cli query protocol-parameters --testnet-magic 42
...
"maxTxExecutionUnits": {
"memory": 10000000,
"steps": 10000000000
},
[nix-shell:/home/lawrence/src/cardano-lottery]$ cabal exec cardano-lottery-scripts -- ./tmp scripts
Writing scripts (fully applied) to: ./tmp
Writing script: ./tmp/cardano-lottery-test-1.flat (Size: 3.7kB, Cost: ExCPU 406194123, ExMemory 1091518)
Writing script: ./tmp/cardano-lottery-test-2.flat (Size: 15.4kB, Cost: ExCPU 3019993736, ExMemory 8148743)
Writing script: ./tmp/cardano-lottery-test-3.flat (Size: 15.2kB, Cost: ExCPU 2364486314, ExMemory 6416120)
Writing script: ./tmp/cardano-lottery-test-4.flat (Size: 5.6kB, Cost: ExCPU 915565065, ExMemory 2608478)
Writing script: ./tmp/cardano-lottery-test-5.flat (Size: 3.9kB, Cost: ExCPU 554201480, ExMemory 1408136)
Writing script: ./tmp/cardano-lottery-test-6.flat (Size: 5.7kB, Cost: ExCPU 940400050, ExMemory 2677320)
Writing script: ./tmp/cardano-lottery-test-7.flat (Size: 4.0kB, Cost: ExCPU 566110417, ExMemory 1435868)
Writing script: ./tmp/cardano-lottery-test-8.flat (Size: 5.8kB, Cost: ExCPU 1065342546, ExMemory 3028910)
Writing script: ./tmp/cardano-lottery-test-9.flat (Size: 4.1kB, Cost: ExCPU 629691016, ExMemory 1587730)
Writing script: ./tmp/cardano-lottery-test-10.flat (Size: 5.8kB, Cost: ExCPU 1088725279, ExMemory 3097532)
Writing script: ./tmp/cardano-lottery-test-11.flat (Size: 4.2kB, Cost: ExCPU 636199690, ExMemory 1602042)
Writing script: ./tmp/cardano-lottery-test-12.flat (Size: 5.7kB, Cost: ExCPU 987165516, ExMemory 2814564)
Writing script: ./tmp/cardano-lottery-test-13.flat (Size: 4.0kB, Cost: ExCPU 579127765, ExMemory 1464492)
Writing script: ./tmp/cardano-lottery-test-14.flat (Size: 6.0kB, Cost: ExCPU 1237050508, ExMemory 3517744)
Writing script: ./tmp/cardano-lottery-test-15.flat (Size: 4.3kB, Cost: ExCPU 706288963, ExMemory 1768216)
Writing script: ./tmp/cardano-lottery-test-16.flat (Size: 5.7kB, Cost: ExCPU 1033930982, ExMemory 2951808)
Writing script: ./tmp/cardano-lottery-test-17.flat (Size: 4.0kB, Cost: ExCPU 592145113, ExMemory 1493116)
Writing script: ./tmp/cardano-lottery-test-18.flat (Size: 5.7kB, Cost: ExCPU 1033930982, ExMemory 2951808)
Writing script: ./tmp/cardano-lottery-test-19.flat (Size: 4.0kB, Cost: ExCPU 592145113, ExMemory 1493116)
Writing script: ./tmp/cardano-lottery-test-20.flat (Size: 6.0kB, Cost: ExCPU 1283815974, ExMemory 3654988)
Writing script: ./tmp/cardano-lottery-test-21.flat (Size: 4.3kB, Cost: ExCPU 719306311, ExMemory 1796840)
Writing script: ./tmp/cardano-lottery-test-22.flat (Size: 5.7kB, Cost: ExCPU 1080696448, ExMemory 3089052)
Writing script: ./tmp/cardano-lottery-test-23.flat (Size: 4.0kB, Cost: ExCPU 605162461, ExMemory 1521740)
Writing script: ./tmp/cardano-lottery-test-24.flat (Size: 5.6kB, Cost: ExCPU 887489655, ExMemory 2516668)
Writing script: ./tmp/cardano-lottery-test-25.flat (Size: 3.9kB, Cost: ExCPU 545090942, ExMemory 1377536)
Writing script: ./tmp/cardano-lottery-test-26.flat (Size: 5.9kB, Cost: ExCPU 524878260, ExMemory 1412600)
Writing script: ./tmp/cardano-lottery-test-27.flat (Size: 15.6kB, Cost: ExCPU 2796428779, ExMemory 7806909)
Writing script: ./tmp/cardano-lottery-test-28.flat (Size: 15.6kB, Cost: ExCPU 2791232715, ExMemory 7791301)
Writing script: ./tmp/cardano-lottery-test-29.flat (Size: 15.4kB, Cost: ExCPU 2414734225, ExMemory 6619154)
Writing script: ./tmp/cardano-lottery-test-30.flat (Size: 15.5kB, Cost: ExCPU 3136871659, ExMemory 8647780)
Writing script: ./tmp/cardano-lottery-test-31.flat (Size: 15.7kB, Cost: ExCPU 3613221561, ExMemory 10220558)
Writing script: ./tmp/cardano-lottery-test-32.flat (Size: 15.7kB, Cost: ExCPU 2962464005, ExMemory 8132994)
Writing script: ./tmp/cardano-lottery-test-33.flat (Size: 15.4kB, Cost: ExCPU 2826694114, ExMemory 7768088)
Writing script: ./tmp/cardano-lottery-test-34.flat (Size: 15.3kB, Cost: ExCPU 2781466350, ExMemory 7640046)
Writing script: ./tmp/cardano-lottery-test-35.flat (Size: 15.4kB, Cost: ExCPU 2341189679, ExMemory 6417670)
Total Size: 287.7kB, Cost: ExCPU 50259437796, ExMemory 137971185
[nix-shell:~/src/cardano-lottery]$ cardano-cli query protocol-parameters --testnet-magic 42
...
"maxTxExecutionUnits": {
"memory": 16000000,
"steps": 10000000000
},
+++ readlink -f ./transfertoken-lotto-tx.sh
++ dirname /home/lawrence/src/cardano-lottery/scripts/cardano-cli/transfertoken-lotto-tx.sh
+ MY_DIR=/home/lawrence/src/cardano-lottery/scripts/cardano-cli
+ source /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/global-export-variables.sh
++ set -e
++ set -o pipefail
++ export PROJECT_ID=
++ PROJECT_ID=
++ export BASE=/home/lawrence/src/cardano-lottery
++ BASE=/home/lawrence/src/cardano-lottery
++ export WORK=/home/lawrence/src/cardano-lottery/work
++ WORK=/home/lawrence/src/cardano-lottery/work
++ export CARDANO_CLI=/home/lawrence/.local/bin/cardano-cli
++ CARDANO_CLI=/home/lawrence/.local/bin/cardano-cli
++ export CARDANO_NODE_SOCKET_PATH=/home/lawrence/src/cardano-node/run/current/node-0/node.socket
++ CARDANO_NODE_SOCKET_PATH=/home/lawrence/src/cardano-node/run/current/node-0/node.socket
++ export TESTNET_MAGIC=42
++ TESTNET_MAGIC=42
++ export ADMIN_VKEY=/home/lawrence/.local/keys/devnet/01.vkey
++ ADMIN_VKEY=/home/lawrence/.local/keys/devnet/01.vkey
++ export ADMIN_SKEY=/home/lawrence/.local/keys/devnet/01.skey
++ ADMIN_SKEY=/home/lawrence/.local/keys/devnet/01.skey
++ export ADMIN_PKH=/home/lawrence/.local/keys/devnet/01.pkh
++ ADMIN_PKH=/home/lawrence/.local/keys/devnet/01.pkh
++ export PLAYER_VKEY=/home/lawrence/.local/keys/devnet/02.vkey
++ PLAYER_VKEY=/home/lawrence/.local/keys/devnet/02.vkey
++ export PLAYER_SKEY=/home/lawrence/.local/keys/devnet/02.skey
++ PLAYER_SKEY=/home/lawrence/.local/keys/devnet/02.skey
++ export PLAYER_PKH=/home/lawrence/.local/keys/devnet/02.pkh
++ PLAYER_PKH=/home/lawrence/.local/keys/devnet/02.pkh
++ export SPONSOR_VKEY=/home/lawrence/.local/keys/devnet/03.vkey
++ SPONSOR_VKEY=/home/lawrence/.local/keys/devnet/03.vkey
++ export SPONSOR_SKEY=/home/lawrence/.local/keys/devnet/03.skey
++ SPONSOR_SKEY=/home/lawrence/.local/keys/devnet/03.skey
++ export SPONSOR_PKH=/home/lawrence/.local/keys/devnet/03.pkh
++ SPONSOR_PKH=/home/lawrence/.local/keys/devnet/03.pkh
++ export MIN_ADA_OUTPUT_TX=2000000
++ MIN_ADA_OUTPUT_TX=2000000
++ export COLLATERAL_ADA=10000000
++ COLLATERAL_ADA=10000000
++ export ADMIN_COLLATERAL=6ac3b15cd5b82fabbb5bbaa3bc25933f43ba50422cf2268ea522e563050529f4#2
++ ADMIN_COLLATERAL=6ac3b15cd5b82fabbb5bbaa3bc25933f43ba50422cf2268ea522e563050529f4#2
++ export PLAYER_COLLATERAL=6ac3b15cd5b82fabbb5bbaa3bc25933f43ba50422cf2268ea522e563050529f4#4
++ PLAYER_COLLATERAL=6ac3b15cd5b82fabbb5bbaa3bc25933f43ba50422cf2268ea522e563050529f4#4
++ export SPONSOR_COLLATERAL=6ac3b15cd5b82fabbb5bbaa3bc25933f43ba50422cf2268ea522e563050529f4#6
++ SPONSOR_COLLATERAL=6ac3b15cd5b82fabbb5bbaa3bc25933f43ba50422cf2268ea522e563050529f4#6
+ echo 'Socket path: /home/lawrence/src/cardano-node/run/current/node-0/node.socket'
Socket path: /home/lawrence/src/cardano-node/run/current/node-0/node.socket
+ ls -al /home/lawrence/src/cardano-node/run/current/node-0/node.socket
srwxr-xr-x 1 lawrence lawrence 0 May 5 22:39 /home/lawrence/src/cardano-node/run/current/node-0/node.socket
+ mkdir -p /home/lawrence/src/cardano-lottery/work
+ mkdir -p /home/lawrence/src/cardano-lottery/work-backup
+ cp -f /home/lawrence/src/cardano-lottery/work/admin-utxo-valid.json /home/lawrence/src/cardano-lottery/work/admin-utxo.json /home/lawrence/src/cardano-lottery/work/buy-datum-in.json /home/lawrence/src/cardano-lottery/work/buy-datum-out.json /home/lawrence/src/cardano-lottery/work/buy-tx-alonzo.body /home/lawrence/src/cardano-lottery/work/buy-tx-alonzo.tx /home/lawrence/src/cardano-lottery/work/buy-validator-utxo.json /home/lawrence/src/cardano-lottery/work/init-tx-alonzo.body /home/lawrence/src/cardano-lottery/work/init-tx-alonzo.tx /home/lawrence/src/cardano-lottery/work/lotto-datum-in.json /home/lawrence/src/cardano-lottery/work/lotto-datum-out.json /home/lawrence/src/cardano-lottery/work/lotto-validator-utxo.json /home/lawrence/src/cardano-lottery/work/open-tx-alonzo.body /home/lawrence/src/cardano-lottery/work/open-tx-alonzo.tx /home/lawrence/src/cardano-lottery/work/player-utxo-valid.json /home/lawrence/src/cardano-lottery/work/player-utxo.json /home/lawrence/src/cardano-lottery/work/pparms.json /home/lawrence/src/cardano-lottery/work/redeemer-ticket-mint.json /home/lawrence/src/cardano-lottery/work/startbuy-tx-alonzo.body /home/lawrence/src/cardano-lottery/work/startbuy-tx-alonzo.tx /home/lawrence/src/cardano-lottery/work-backup
+ /home/lawrence/.local/bin/cardano-cli query protocol-parameters --testnet-magic 42 --out-file /home/lawrence/src/cardano-lottery/work/pparms.json
+ lotto_validator_script=/home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-validator.plutus
+ buy_validator_script=/home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/buy-validator.plutus
++ /home/lawrence/.local/bin/cardano-cli address build --payment-script-file /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-validator.plutus --testnet-magic 42
+ lotto_validator_script_addr=addr_test1wr2rlqdhs75p2gucns6wd3q665xrw9m252ku59whvddvfkqqhn4n6
++ /home/lawrence/.local/bin/cardano-cli address build --payment-script-file /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/buy-validator.plutus --testnet-magic 42
+ buy_validator_script_addr=addr_test1wrahpnqj76ruamc955e4xy32qmt4ng7n80wktjw83ahdv4s84q9yz
+ buy_redeemer_file_path=/home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/redeemer-buy-transfertoken.json
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/buy-token-name.json
++ jq -r .bytes
+ buy_token_name=6f3431cf2b10fca80d19e805253bbc32557e2cba9ef654ab138d13fbd98dae85
++ cat /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/lotto-thread-token-policy.hash
++ jq -r .bytes
+ thread_token_mph=aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b
++ cat /home/lawrence/.local/keys/devnet/01.pkh
+ admin_pkh=4ccdbf08ac0bd876fc9cf1ac03ed86ceef4052cde7a4989c59e87819
+ echo 'starting transfer token'
starting transfer token
++ /home/lawrence/.local/bin/cardano-cli address build --testnet-magic 42 --payment-verification-key-file /home/lawrence/.local/keys/devnet/01.vkey
+ admin_utxo_addr=addr_test1vpxvm0cg4s9asahunnc6cqldsm8w7szjehn6fxyut858sxgqvc3q5
+ /home/lawrence/.local/bin/cardano-cli query utxo --address addr_test1vpxvm0cg4s9asahunnc6cqldsm8w7szjehn6fxyut858sxgqvc3q5 --cardano-mode --testnet-magic 42 --out-file /home/lawrence/src/cardano-lottery/work/admin-utxo.json
+ cat /home/lawrence/src/cardano-lottery/work/admin-utxo.json
+ jq -r 'to_entries[] | select(.value.value.lovelace > 10000000 ) | .key'
+ readarray admin_utxo_valid_array
++ echo 5403f06a3e1da28cf1b46d1859dce68322afef696f1eafbcc1a7436f7dd8374b#0
++ tr -d '\n'
+ admin_utxo_in=5403f06a3e1da28cf1b46d1859dce68322afef696f1eafbcc1a7436f7dd8374b#0
+ /home/lawrence/.local/bin/cardano-cli query utxo --address addr_test1wrahpnqj76ruamc955e4xy32qmt4ng7n80wktjw83ahdv4s84q9yz --testnet-magic 42 --out-file /home/lawrence/src/cardano-lottery/work/buy-validator-utxo.json
++ jq -r 'to_entries[]
| select(.value.value."aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b"."6f3431cf2b10fca80d19e805253bbc32557e2cba9ef654ab138d13fbd98dae85")
| .key' /home/lawrence/src/cardano-lottery/work/buy-validator-utxo.json
+ buy_validator_utxo_tx_in=6b6fa944333e434087c3f9c6e4e0223e1d8ee463e0166f22bd8e95d0f9a0a216#1
+ '[' devnet == devnet ']'
+ cp /home/lawrence/src/cardano-lottery/work/buy-datum-out.json /home/lawrence/src/cardano-lottery/work/buy-datum-in.json
++ jq -r '.fields[1].int ' /home/lawrence/src/cardano-lottery/work/buy-datum-in.json
+ buy_total_value=22000000
+ cp /home/lawrence/src/cardano-lottery/work/buy-datum-in.json /home/lawrence/src/cardano-lottery/work/buy-datum-out.json
+ /home/lawrence/.local/bin/cardano-cli transaction build --alonzo-era --cardano-mode --testnet-magic 42 --tx-in 5403f06a3e1da28cf1b46d1859dce68322afef696f1eafbcc1a7436f7dd8374b#0 --tx-in 6b6fa944333e434087c3f9c6e4e0223e1d8ee463e0166f22bd8e95d0f9a0a216#1 --tx-in-script-file /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/buy-validator.plutus --tx-in-datum-file /home/lawrence/src/cardano-lottery/work/buy-datum-in.json --tx-in-redeemer-file /home/lawrence/src/cardano-lottery/scripts/cardano-cli/devnet/data/redeemer-buy-transfertoken.json --tx-in-collateral 6ac3b15cd5b82fabbb5bbaa3bc25933f43ba50422cf2268ea522e563050529f4#2 --tx-out 'addr_test1wr2rlqdhs75p2gucns6wd3q665xrw9m252ku59whvddvfkqqhn4n6+22000000 + 1 aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b.6f3431cf2b10fca80d19e805253bbc32557e2cba9ef654ab138d13fbd98dae85' --tx-out-datum-embed-file /home/lawrence/src/cardano-lottery/work/lotto-datum-out.json --change-address addr_test1vpxvm0cg4s9asahunnc6cqldsm8w7szjehn6fxyut858sxgqvc3q5 --required-signer-hash 4ccdbf08ac0bd876fc9cf1ac03ed86ceef4052cde7a4989c59e87819 --protocol-params-file /home/lawrence/src/cardano-lottery/work/pparms.json --out-file /home/lawrence/src/cardano-lottery/work/transfertoken-tx-alonzo.body
Estimated transaction fee: Lovelace 116503
+ echo 'tx has been built'
tx has been built
+ /home/lawrence/.local/bin/cardano-cli transaction sign --tx-body-file /home/lawrence/src/cardano-lottery/work/transfertoken-tx-alonzo.body --testnet-magic 42 --signing-key-file /home/lawrence/.local/keys/devnet/01.skey --out-file /home/lawrence/src/cardano-lottery/work/transfertoken-tx-alonzo.tx
+ echo 'tx has been signed'
tx has been signed
+ echo 'Submit the tx with plutus script and wait 5 seconds...'
Submit the tx with plutus script and wait 5 seconds...
+ /home/lawrence/.local/bin/cardano-cli transaction submit --tx-file /home/lawrence/src/cardano-lottery/work/transfertoken-tx-alonzo.tx --testnet-magic 42
Transaction successfully submitted.
[nix-shell:~/src/cardano-lottery]$ cardano-cli query utxo --address addr_test1wrahpnqj76ruamc955e4xy32qmt4ng7n80wktjw83ahdv4s84q9yz --cardano-mode --testnet-magic 42
TxHash TxIx Amount
--------------------------------------------------------------------------------------
[nix-shell:~/src/cardano-lottery]$ cardano-cli query utxo --address addr_test1wr2rlqdhs75p2gucns6wd3q665xrw9m252ku59whvddvfkqqhn4n6 --cardano-mode --testnet-magic 42
TxHash TxIx Amount
--------------------------------------------------------------------------------------
5403f06a3e1da28cf1b46d1859dce68322afef696f1eafbcc1a7436f7dd8374b 1 20000000 lovelace + 1 aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b.ad5b9a27f875fc97bb034a47780832d47f8c7f97385cf8783e610c63f839b483 + TxOutDatumHash ScriptDataInAlonzoEra "0af815f66507448cd3df2246fef78326e09489e969dc03c70066b065969bc01a"
78b8d767d2f72f38e594a79efd5b888aff38dbe226b2ecc97fd8abd7bd734e99 1 22000000 lovelace + 1 aa35880213f8b370be5c7b55225c18ab6fd2204e2f87d48a4701e02b.6f3431cf2b10fca80d19e805253bbc32557e2cba9ef654ab138d13fbd98dae85 + TxOutDatumHash ScriptDataInAlonzoEra "0af815f66507448cd3df2246fef78326e09489e969dc03c70066b065969bc01a"