-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
769 lines (702 loc) · 57.7 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en-us">
<head>
<script type="module" crossorigin src="js/google-analytics.js"></script>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>OpenBiSea | MotoDEX</title>
<link rel="shortcut icon" href="TemplateData/favicon.ico">
<link rel="stylesheet" href="TemplateData/style.css">
<script type="module" crossorigin src="web3/index.js"></script>
<script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/[email protected]/dist/near-api-js.js"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;800&display=swap" rel="stylesheet">
</head>
<body>
<div id="custom-logo" hidden></div>
<div id="custom-loader" hidden>
<div class="fill"></div>
<div id="custom-bar">
<div class="progressBar"></div>
</div>
<div class="progressLabel">
<tr>0%</tr>
</div>
</div>
<div id="alert-custom-logo" hidden>
<div class="alert-custom-img"></div>
<div class="alert-custom-text">
<span>Experience our captivating web game, now available on desktop! Explore a world of adventure, strategy, and endless fun. Don't miss out on the excitement - <br><b>Play Now!</b></span>
</div>
<div class="alert-custom-button" id="buyButton">
<span>BUY</span>
</div>
</div>
<div class="webgl-content" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden;">
<div id="unity-container" class="unity-desktop">
<canvas id="unity-canvas" width=960 height=600></canvas>
<div id="unity-loading-bar">
<div id="unity-logo"></div>
<div id="unity-progress-bar-empty">
<div id="unity-progress-bar-full"></div>
</div>
</div>
<div id="unity-warning"> </div>
<div id="unity-footer">
<div id="unity-webgl-logo"></div>
<div id="unity-fullscreen-button"></div>
</div>
</div>
</div>
<script>
document.body.appendChild(Object.assign(document.createElement("script"), { type: "text/javascript", src: "./network.js" }));
</script>
<script type="module">
import {
ApiPromise, WsProvider
} from 'https://cdn.jsdelivr.net/npm/@polkadot/[email protected]/+esm'
// Construct
const wsProvider = new WsProvider('wss://ws.azero.dev');
const api = await ApiPromise.create({ provider: wsProvider });
console.log(api.genesisHash.toHex());
import {
ContractPromise
} from 'https://cdn.jsdelivr.net/npm/@polkadot/[email protected]/+esm'
const abi = {"source":{"hash":"0x8a1dc34a059973304d3d2614e3f928b25a1b2f7006f4a304cd7ba2289980f0ad","language":"ink! 4.3.0","compiler":"rustc 1.73.0","build_info":{"build_mode":"Release","cargo_contract_version":"3.2.0","rust_toolchain":"stable-aarch64-apple-darwin","wasm_opt_settings":{"keep_debug_symbols":false,"optimization_passes":"Z"}}},"contract":{"name":"motodex","version":"0.1.1","authors":["[your_name] <[your_email]>"]},"spec":{"constructors":[{"args":[{"label":"gameserver","type":{"displayName":["AccountId"],"type":0}},{"label":"price_main_coin_usd","type":{"displayName":["Option"],"type":19}},{"label":"one_main_coin","type":{"displayName":["Option"],"type":19}}],"default":false,"docs":[],"label":"new","payable":false,"returnType":{"displayName":["ink_primitives","ConstructorResult"],"type":20},"selector":"0x9bae9d5e"}],"docs":[],"environment":{"accountId":{"displayName":["AccountId"],"type":0},"balance":{"displayName":["Balance"],"type":8},"blockNumber":{"displayName":["BlockNumber"],"type":3},"chainExtension":{"displayName":["ChainExtension"],"type":54},"hash":{"displayName":["Hash"],"type":53},"maxEventTopics":4,"timestamp":{"displayName":["Timestamp"],"type":7}},"events":[{"args":[{"docs":[],"indexed":true,"label":"from","type":{"displayName":["Option"],"type":12}},{"docs":[],"indexed":true,"label":"to","type":{"displayName":["Option"],"type":12}},{"docs":[],"indexed":true,"label":"id","type":{"displayName":["TokenId"],"type":3}}],"docs":["Event emitted when a token transfer occurs."],"label":"Transfer"},{"args":[{"docs":[],"indexed":true,"label":"from","type":{"displayName":["AccountId"],"type":0}},{"docs":[],"indexed":true,"label":"to","type":{"displayName":["AccountId"],"type":0}},{"docs":[],"indexed":true,"label":"id","type":{"displayName":["TokenId"],"type":3}}],"docs":["Event emitted when a token approve occurs."],"label":"Approval"},{"args":[{"docs":[],"indexed":true,"label":"owner","type":{"displayName":["AccountId"],"type":0}},{"docs":[],"indexed":true,"label":"operator","type":{"displayName":["AccountId"],"type":0}},{"docs":[],"indexed":false,"label":"approved","type":{"displayName":["bool"],"type":25}}],"docs":["Event emitted when an operator is enabled or disabled for an owner.","The operator can manage all NFTs of the owner."],"label":"ApprovalForAll"},{"args":[{"docs":[],"indexed":true,"label":"from","type":{"displayName":["AccountId"],"type":0}},{"docs":[],"indexed":true,"label":"token_id","type":{"displayName":["TokenId"],"type":3}},{"docs":[],"indexed":false,"label":"value","type":{"displayName":["Balance"],"type":8}},{"docs":[],"indexed":false,"label":"block_timestamp","type":{"displayName":["Timestamp"],"type":7}}],"docs":["Converted."],"label":"AddMoto"},{"args":[{"docs":[],"indexed":true,"label":"from","type":{"displayName":["AccountId"],"type":0}},{"docs":[],"indexed":true,"label":"token_id","type":{"displayName":["TokenId"],"type":3}},{"docs":[],"indexed":false,"label":"value","type":{"displayName":["Balance"],"type":8}},{"docs":[],"indexed":false,"label":"block_timestamp","type":{"displayName":["Timestamp"],"type":7}}],"docs":["Converted."],"label":"AddTrack"},{"args":[{"docs":[],"indexed":true,"label":"to","type":{"displayName":["AccountId"],"type":0}},{"docs":[],"indexed":true,"label":"token_id","type":{"displayName":["TokenId"],"type":3}},{"docs":[],"indexed":false,"label":"block_timestamp","type":{"displayName":["Timestamp"],"type":7}}],"docs":["Converted."],"label":"ReturnMoto"},{"args":[{"docs":[],"indexed":true,"label":"to","type":{"displayName":["AccountId"],"type":0}},{"docs":[],"indexed":true,"label":"token_id","type":{"displayName":["TokenId"],"type":3}},{"docs":[],"indexed":false,"label":"block_timestamp","type":{"displayName":["Timestamp"],"type":7}}],"docs":["Converted."],"label":"ReturnTrack"},{"args":[{"docs":[],"indexed":true,"label":"from","type":{"displayName":["AccountId"],"type":0}},{"docs":[],"indexed":true,"label":"token_id","type":{"displayName":["TokenId"],"type":3}},{"docs":[],"indexed":false,"label":"block_timestamp","type":{"displayName":["Timestamp"],"type":7}},{"docs":[],"indexed":false,"label":"value","type":{"displayName":["Balance"],"type":8}},{"docs":[],"indexed":false,"label":"motodex_type","type":{"displayName":["MotodexId"],"type":2}}],"docs":["Converted."],"label":"Purchase"},{"args":[{"docs":[],"indexed":true,"label":"from","type":{"displayName":["AccountId"],"type":0}},{"docs":[],"indexed":true,"label":"token_id","type":{"displayName":["TokenId"],"type":3}},{"docs":[],"indexed":false,"label":"block_timestamp","type":{"displayName":["Timestamp"],"type":7}},{"docs":[],"indexed":false,"label":"value","type":{"displayName":["Balance"],"type":8}}],"docs":["Converted."],"label":"AddHealthMoney"},{"args":[{"docs":[],"indexed":true,"label":"from","type":{"displayName":["AccountId"],"type":0}},{"docs":[],"indexed":true,"label":"token_id","type":{"displayName":["TokenId"],"type":3}},{"docs":[],"indexed":false,"label":"block_timestamp","type":{"displayName":["Timestamp"],"type":7}},{"docs":[],"indexed":false,"label":"health_pill_token_id","type":{"displayName":["TokenId"],"type":3}}],"docs":["Converted."],"label":"AddHealthNFT"},{"args":[{"docs":[],"indexed":false,"label":"block_timestamp","type":{"displayName":["Timestamp"],"type":7}},{"docs":[],"indexed":true,"label":"track_token_id","type":{"displayName":["TokenId"],"type":3}},{"docs":[],"indexed":true,"label":"moto_token_id","type":{"displayName":["TokenId"],"type":3}},{"docs":[],"indexed":false,"label":"last_track_time_result","type":{"displayName":["Timestamp"],"type":7}}],"docs":["Converted."],"label":"CreateOrUpdateGameSession"},{"args":[{"docs":[],"indexed":false,"label":"final_game_session_view","type":{"displayName":["FinalGameSessionView"],"type":44}}],"docs":["Converted."],"label":"AfterSyncSession"}],"lang_error":{"displayName":["ink","LangError"],"type":21},"messages":[{"args":[{"label":"owner","type":{"displayName":["AccountId"],"type":0}}],"default":false,"docs":[" Returns the balance of the owner.",""," This represents the amount of unique tokens the owner has."],"label":"balance_of","mutates":false,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":22},"selector":"0x0f755a56"},{"args":[{"label":"id","type":{"displayName":["TokenId"],"type":3}}],"default":false,"docs":[" Returns the owner of the token."],"label":"owner_of","mutates":false,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":23},"selector":"0x99720c1e"},{"args":[{"label":"id","type":{"displayName":["TokenId"],"type":3}}],"default":false,"docs":[" Returns the approved account ID for this token if any."],"label":"get_approved","mutates":false,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":23},"selector":"0x27592dea"},{"args":[{"label":"owner","type":{"displayName":["AccountId"],"type":0}},{"label":"operator","type":{"displayName":["AccountId"],"type":0}}],"default":false,"docs":[" Returns `true` if the operator is approved by the owner."],"label":"is_approved_for_all","mutates":false,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":24},"selector":"0x0f5922e9"},{"args":[{"label":"to","type":{"displayName":["AccountId"],"type":0}},{"label":"approved","type":{"displayName":["bool"],"type":25}}],"default":false,"docs":[" Approves or disapproves the operator for all tokens of the caller."],"label":"set_approval_for_all","mutates":true,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":26},"selector":"0xcfd0c27b"},{"args":[{"label":"to","type":{"displayName":["AccountId"],"type":0}},{"label":"id","type":{"displayName":["TokenId"],"type":3}}],"default":false,"docs":[" Approves the account to transfer the specified token on behalf of the caller."],"label":"approve","mutates":true,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":26},"selector":"0x681266a0"},{"args":[{"label":"destination","type":{"displayName":["AccountId"],"type":0}},{"label":"id","type":{"displayName":["TokenId"],"type":3}}],"default":false,"docs":[" Transfers the token from the caller to the given destination."],"label":"transfer","mutates":true,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":26},"selector":"0x84a15da1"},{"args":[{"label":"from","type":{"displayName":["AccountId"],"type":0}},{"label":"to","type":{"displayName":["AccountId"],"type":0}},{"label":"id","type":{"displayName":["TokenId"],"type":3}}],"default":false,"docs":[" Transfer approved or owned token."],"label":"transfer_from","mutates":true,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":26},"selector":"0x0b396f18"},{"args":[],"default":false,"docs":[" updateCounter."],"label":"update_counter","mutates":true,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":26},"selector":"0xc3dc1176"},{"args":[{"label":"owner","type":{"displayName":["AccountId"],"type":0}},{"label":"index","type":{"displayName":["u32"],"type":3}}],"default":false,"docs":[" Get token id by index."],"label":"owners_token_by_index","mutates":false,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":29},"selector":"0x6d8b2b4f"},{"args":[{"label":"id","type":{"displayName":["TokenId"],"type":3}}],"default":false,"docs":[" Creates a new token."],"label":"mint","mutates":true,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":26},"selector":"0xcfdd9aa2"},{"args":[{"label":"motodex_type","type":{"displayName":["MotodexType"],"type":30}},{"label":"to","type":{"displayName":["Option"],"type":12}}],"default":false,"docs":[" Creates a new token."],"label":"mint_owner","mutates":true,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":34},"selector":"0x31fb39e5"},{"args":[{"label":"id","type":{"displayName":["TokenId"],"type":3}}],"default":false,"docs":[" Deletes an existing token. Only the owner can burn the token."],"label":"burn","mutates":true,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":26},"selector":"0xb1efc17b"},{"args":[],"default":false,"docs":[" Returns the total token supply."],"label":"total_supply","mutates":false,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":36},"selector":"0xdb6375a8"},{"args":[],"default":false,"docs":[" Returns the collection_id."],"label":"collection_id","mutates":false,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":37},"selector":"0xc10375f2"},{"args":[{"label":"code_hash","type":{"displayName":[],"type":1}}],"default":false,"docs":[" Modifies the code which is used to execute calls to this contract address (`AccountId`).",""," We use this to upgrade the contract logic. We don't do any authorization here, any caller"," can execute this method. In a production contract you would do some authorization here."],"label":"set_code","mutates":true,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":20},"selector":"0x694fb50f"},{"args":[{"label":"token_id","type":{"displayName":["TokenId"],"type":3}}],"default":false,"docs":[" actions_of_game"],"label":"add_moto","mutates":true,"payable":true,"returnType":{"displayName":["ink","MessageResult"],"type":20},"selector":"0x8c5eb225"},{"args":[{"label":"token_id","type":{"displayName":["TokenId"],"type":3}}],"default":false,"docs":[],"label":"add_track","mutates":true,"payable":true,"returnType":{"displayName":["ink","MessageResult"],"type":20},"selector":"0x5a191828"},{"args":[{"label":"token_id","type":{"displayName":["TokenId"],"type":3}}],"default":false,"docs":[],"label":"return_moto","mutates":true,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":20},"selector":"0x04250641"},{"args":[{"label":"token_id","type":{"displayName":["TokenId"],"type":3}}],"default":false,"docs":[],"label":"return_track","mutates":true,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":20},"selector":"0x44510dd0"},{"args":[{"label":"token_id","type":{"displayName":["TokenId"],"type":3}}],"default":false,"docs":[],"label":"get_token_health","mutates":false,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":36},"selector":"0x632ec306"},{"args":[{"label":"token_id","type":{"displayName":["TokenId"],"type":3}}],"default":false,"docs":[],"label":"get_token_type_nft","mutates":false,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":41},"selector":"0xd333cb1d"},{"args":[{"label":"type_nft","type":{"displayName":["MotodexId"],"type":2}}],"default":false,"docs":[],"label":"purchase","mutates":true,"payable":true,"returnType":{"displayName":["ink","MessageResult"],"type":34},"selector":"0x44b97dba"},{"args":[{"label":"_type_nft","type":{"displayName":["MotodexId"],"type":2}},{"label":"_referral","type":{"displayName":["Option"],"type":12}}],"default":false,"docs":[],"label":"purchase_batch","mutates":true,"payable":true,"returnType":{"displayName":["ink","MessageResult"],"type":34},"selector":"0x7fdd03c4"},{"args":[{"label":"token_id","type":{"displayName":["TokenId"],"type":3}}],"default":false,"docs":[],"label":"add_health_money","mutates":true,"payable":true,"returnType":{"displayName":["ink","MessageResult"],"type":26},"selector":"0x7b7e5726"},{"args":[{"label":"token_id","type":{"displayName":["TokenId"],"type":3}},{"label":"health_pill_token_id","type":{"displayName":["TokenId"],"type":3}}],"default":false,"docs":[],"label":"add_health_nft","mutates":true,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":26},"selector":"0xdf2adc7b"},{"args":[{"label":"_token_id","type":{"displayName":["TokenId"],"type":3}},{"label":"_percent","type":{"displayName":["u8"],"type":2}}],"default":false,"docs":[],"label":"set_percent_for_track_owner","mutates":true,"payable":true,"returnType":{"displayName":["ink","MessageResult"],"type":26},"selector":"0xd349833f"},{"args":[],"default":false,"docs":[],"label":"get_latest_price","mutates":false,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":36},"selector":"0x9b610c2e"},{"args":[],"default":false,"docs":[],"label":"get_minimal_fee_rate","mutates":false,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":22},"selector":"0x3ba44920"},{"args":[],"default":false,"docs":[],"label":"get_minimal_fee","mutates":false,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":36},"selector":"0x66fc4998"},{"args":[{"label":"type_nft","type":{"displayName":["MotodexId"],"type":2}}],"default":false,"docs":[],"label":"get_price_for_type","mutates":false,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":36},"selector":"0x52fe9123"},{"args":[{"label":"type_nft","type":{"displayName":["MotodexId"],"type":2}}],"default":false,"docs":[],"label":"value_in_main_coin","mutates":false,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":36},"selector":"0x24a39de7"},{"args":[{"label":"new_owner","type":{"displayName":["AccountId"],"type":0}}],"default":false,"docs":[],"label":"set_owner","mutates":true,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":26},"selector":"0x367facd6"},{"args":[{"label":"account_id","type":{"displayName":["AccountId"],"type":0}}],"default":false,"docs":[],"label":"set_game_server","mutates":true,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":26},"selector":"0xc8271125"},{"args":[{"label":"price","type":{"displayName":["u128"],"type":8}}],"default":false,"docs":[],"label":"set_main_price","mutates":true,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":26},"selector":"0xcbc416ea"},{"args":[{"label":"price","type":{"displayName":["u128"],"type":8}},{"label":"type_nft","type":{"displayName":["MotodexId"],"type":2}}],"default":false,"docs":[],"label":"set_price_for_type","mutates":true,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":26},"selector":"0x8afae7de"},{"args":[{"label":"minimal_fee_rate","type":{"displayName":["u32"],"type":3}}],"default":false,"docs":[],"label":"set_minimal_fee","mutates":true,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":26},"selector":"0x6b46025b"},{"args":[{"label":"max_moto_per_session","type":{"displayName":["u64"],"type":7}}],"default":false,"docs":[],"label":"set_max_moto_per_game","mutates":true,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":26},"selector":"0xcc54dfc1"},{"args":[{"label":"track_token_id","type":{"displayName":["TokenId"],"type":3}},{"label":"moto_token_id","type":{"displayName":["TokenId"],"type":3}},{"label":"last_track_time_result","type":{"displayName":["Timestamp"],"type":7}}],"default":false,"docs":[],"label":"create_or_update_game_session_for","mutates":true,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":26},"selector":"0x71e90b78"},{"args":[{"label":"track_token_id","type":{"displayName":["TokenId"],"type":3}}],"default":false,"docs":[],"label":"remove_game_session","mutates":true,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":26},"selector":"0x11dca1cc"},{"args":[],"default":false,"docs":[],"label":"get_finishing_sessions_ids","mutates":false,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":42},"selector":"0x0f952d9d"},{"args":[{"label":"track_token_id","type":{"displayName":["TokenId"],"type":3}}],"default":false,"docs":[],"label":"sync_epoch_game_session","mutates":true,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":43},"selector":"0xee765da6"},{"args":[{"label":"_from_index","type":{"displayName":["Option"],"type":19}},{"label":"_limit","type":{"displayName":["Option"],"type":47}}],"default":false,"docs":[" Added tokens (owner is current contract id)"," - Returns a list of TokenIdOwnerType :"," ```json"," \"TokenIdOwnerType\": {"," \"track_token_id\": String | null,"," \"track_type\": String | null,"," \"moto_token_id\": String | null,"," \"moto_type\": String | null,"," \"owner_id\": String,"," \"active_sessions\": [String] | null"," }"," ```"],"label":"token_ids_and_owners","mutates":false,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":48},"selector":"0xa99c5874"},{"args":[{"label":"token_id","type":{"displayName":["TokenId"],"type":3}},{"label":"health","type":{"displayName":["u128"],"type":8}}],"default":false,"docs":[],"label":"set_health_for_token","mutates":true,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":26},"selector":"0xa1934db8"}]},"storage":{"root":{"layout":{"struct":{"fields":[{"layout":{"root":{"layout":{"leaf":{"key":"0xa5f7adc7","ty":0}},"root_key":"0xa5f7adc7"}},"name":"token_owner"},{"layout":{"root":{"layout":{"leaf":{"key":"0x785dab69","ty":0}},"root_key":"0x785dab69"}},"name":"token_approvals"},{"layout":{"root":{"layout":{"leaf":{"key":"0x9ac56c58","ty":3}},"root_key":"0x9ac56c58"}},"name":"owned_tokens_count"},{"layout":{"root":{"layout":{"leaf":{"key":"0x363b9c2c","ty":4}},"root_key":"0x363b9c2c"}},"name":"owned_token_ids"},{"layout":{"root":{"layout":{"leaf":{"key":"0xba1d40e0","ty":5}},"root_key":"0xba1d40e0"}},"name":"operator_approvals"},{"layout":{"leaf":{"key":"0x00000000","ty":6}},"name":"owners"},{"layout":{"leaf":{"key":"0x00000000","ty":6}},"name":"game_servers"},{"layout":{"leaf":{"key":"0x00000000","ty":3}},"name":"referral_rate"},{"layout":{"root":{"layout":{"leaf":{"key":"0x7c74d60b","ty":6}},"root_key":"0x7c74d60b"}},"name":"refferals"},{"layout":{"leaf":{"key":"0x00000000","ty":3}},"name":"minimal_fee_rate"},{"layout":{"leaf":{"key":"0x00000000","ty":7}},"name":"epoch_minimal_interval"},{"layout":{"leaf":{"key":"0x00000000","ty":7}},"name":"min_game_session_duration"},{"layout":{"leaf":{"key":"0x00000000","ty":7}},"name":"max_moto_per_session"},{"layout":{"leaf":{"key":"0x00000000","ty":8}},"name":"total_supply"},{"layout":{"root":{"layout":{"enum":{"dispatchKey":"0x6551c6fe","name":"MotodexType","variants":{"0":{"fields":[{"layout":{"enum":{"dispatchKey":"0x6551c6fe","name":"Moto","variants":{"0":{"fields":[],"name":"RedBuller"},"1":{"fields":[],"name":"ZebraGrrr"},"2":{"fields":[],"name":"RoboHorse"},"3":{"fields":[],"name":"MetalEyes"},"4":{"fields":[],"name":"BrownKiller"},"5":{"fields":[],"name":"CrazyLine"}}}},"name":"0"}],"name":"Moto"},"1":{"fields":[{"layout":{"enum":{"dispatchKey":"0x6551c6fe","name":"Track","variants":{"0":{"fields":[],"name":"TrackLondon"},"1":{"fields":[],"name":"TrackDubai"},"2":{"fields":[],"name":"TrackAbuDhabi"},"3":{"fields":[],"name":"TrackBeijin"},"4":{"fields":[],"name":"TrackMoscow"},"5":{"fields":[],"name":"TrackMelburn"},"6":{"fields":[],"name":"TrackPeterburg"},"7":{"fields":[],"name":"TrackTaipei"},"8":{"fields":[],"name":"TrackPisa"},"9":{"fields":[],"name":"TrackIslamabad"}}}},"name":"0"}],"name":"Track"},"2":{"fields":[{"layout":{"enum":{"dispatchKey":"0x6551c6fe","name":"HealthPill","variants":{"0":{"fields":[],"name":"HealthPill5"},"1":{"fields":[],"name":"HealthPill10"},"2":{"fields":[],"name":"HealthPill30"},"3":{"fields":[],"name":"HealthPill50"}}}},"name":"0"}],"name":"HealthPill"},"3":{"fields":[],"name":"MagicBox"}}}},"root_key":"0x6551c6fe"}},"name":"token_types"},{"layout":{"root":{"layout":{"struct":{"fields":[{"layout":{"leaf":{"key":"0x5bfc3789","ty":7}},"name":"type_counter"},{"layout":{"leaf":{"key":"0x5bfc3789","ty":7}},"name":"type_limit"},{"layout":{"leaf":{"key":"0x5bfc3789","ty":8}},"name":"type_price"},{"layout":{"leaf":{"key":"0x5bfc3789","ty":9}},"name":"uri"},{"layout":{"leaf":{"key":"0x5bfc3789","ty":9}},"name":"name"},{"layout":{"leaf":{"key":"0x5bfc3789","ty":9}},"name":"description"}],"name":"MotodexTypeMetadata"}},"root_key":"0x5bfc3789"}},"name":"token_type_metadata"},{"layout":{"root":{"layout":{"leaf":{"key":"0xd026e050","ty":8}},"root_key":"0xd026e050"}},"name":"token_health"},{"layout":{"root":{"layout":{"leaf":{"key":"0xe8d38128","ty":3}},"root_key":"0xe8d38128"}},"name":"percent_for_track"},{"layout":{"leaf":{"key":"0x00000000","ty":8}},"name":"price_main_coin_usd"},{"layout":{"leaf":{"key":"0x00000000","ty":8}},"name":"one_main_coin"},{"layout":{"root":{"layout":{"struct":{"fields":[{"layout":{"leaf":{"key":"0x1c668e9a","ty":7}},"name":"init_time"},{"layout":{"leaf":{"key":"0x1c668e9a","ty":3}},"name":"track_token_id"},{"layout":{"leaf":{"key":"0x1c668e9a","ty":10}},"name":"moto"},{"layout":{"leaf":{"key":"0x1c668e9a","ty":7}},"name":"latest_update_time"},{"layout":{"leaf":{"key":"0x1c668e9a","ty":7}},"name":"latest_track_time_result"},{"layout":{"leaf":{"key":"0x1c668e9a","ty":2}},"name":"attempts"},{"layout":{"leaf":{"key":"0x1c668e9a","ty":8}},"name":"game_bids_sum"},{"layout":{"leaf":{"key":"0x1c668e9a","ty":8}},"name":"game_fees_sum"},{"layout":{"enum":{"dispatchKey":"0x1c668e9a","name":"Option","variants":{"0":{"fields":[],"name":"None"},"1":{"fields":[{"layout":{"struct":{"fields":[{"layout":{"enum":{"dispatchKey":"0x1c668e9a","name":"Option","variants":{"0":{"fields":[],"name":"None"},"1":{"fields":[{"layout":{"leaf":{"key":"0x1c668e9a","ty":0}},"name":"0"}],"name":"Some"}}}},"name":"moto_owner_id"},{"layout":{"leaf":{"key":"0x1c668e9a","ty":3}},"name":"moto_token_id"},{"layout":{"leaf":{"key":"0x1c668e9a","ty":7}},"name":"last_track_time_result"}],"name":"GameSessionMoto"}},"name":"0"}],"name":"Some"}}}},"name":"current_winner_moto"},{"layout":{"leaf":{"key":"0x1c668e9a","ty":13}},"name":"epoch_payment"},{"layout":{"leaf":{"key":"0x1c668e9a","ty":7}},"name":"max_moto_per_session"}],"name":"GameSession"}},"root_key":"0x1c668e9a"}},"name":"game_sessions"},{"layout":{"root":{"layout":{"struct":{"fields":[{"layout":{"leaf":{"key":"0x8983d832","ty":17}},"name":"game_bids"}],"name":"TrackGameBid"}},"root_key":"0x8983d832"}},"name":"game_bids"},{"layout":{"root":{"layout":{"leaf":{"key":"0xf86dd1dd","ty":0}},"root_key":"0xf86dd1dd"}},"name":"previous_owners"},{"layout":{"leaf":{"key":"0x00000000","ty":4}},"name":"previous_owners_token_ids"},{"layout":{"root":{"layout":{"struct":{"fields":[{"layout":{"enum":{"dispatchKey":"0x17b57b06","name":"Option","variants":{"0":{"fields":[],"name":"None"},"1":{"fields":[{"layout":{"leaf":{"key":"0x17b57b06","ty":0}},"name":"0"}],"name":"Some"}}}},"name":"owner_id"},{"layout":{"enum":{"dispatchKey":"0x17b57b06","name":"Option","variants":{"0":{"fields":[],"name":"None"},"1":{"fields":[{"layout":{"enum":{"dispatchKey":"0x17b57b06","name":"MotodexType","variants":{"0":{"fields":[{"layout":{"enum":{"dispatchKey":"0x17b57b06","name":"Moto","variants":{"0":{"fields":[],"name":"RedBuller"},"1":{"fields":[],"name":"ZebraGrrr"},"2":{"fields":[],"name":"RoboHorse"},"3":{"fields":[],"name":"MetalEyes"},"4":{"fields":[],"name":"BrownKiller"},"5":{"fields":[],"name":"CrazyLine"}}}},"name":"0"}],"name":"Moto"},"1":{"fields":[{"layout":{"enum":{"dispatchKey":"0x17b57b06","name":"Track","variants":{"0":{"fields":[],"name":"TrackLondon"},"1":{"fields":[],"name":"TrackDubai"},"2":{"fields":[],"name":"TrackAbuDhabi"},"3":{"fields":[],"name":"TrackBeijin"},"4":{"fields":[],"name":"TrackMoscow"},"5":{"fields":[],"name":"TrackMelburn"},"6":{"fields":[],"name":"TrackPeterburg"},"7":{"fields":[],"name":"TrackTaipei"},"8":{"fields":[],"name":"TrackPisa"},"9":{"fields":[],"name":"TrackIslamabad"}}}},"name":"0"}],"name":"Track"},"2":{"fields":[{"layout":{"enum":{"dispatchKey":"0x17b57b06","name":"HealthPill","variants":{"0":{"fields":[],"name":"HealthPill5"},"1":{"fields":[],"name":"HealthPill10"},"2":{"fields":[],"name":"HealthPill30"},"3":{"fields":[],"name":"HealthPill50"}}}},"name":"0"}],"name":"HealthPill"},"3":{"fields":[],"name":"MagicBox"}}}},"name":"0"}],"name":"Some"}}}},"name":"token_type"},{"layout":{"enum":{"dispatchKey":"0x17b57b06","name":"Option","variants":{"0":{"fields":[],"name":"None"},"1":{"fields":[{"layout":{"leaf":{"key":"0x17b57b06","ty":3}},"name":"0"}],"name":"Some"}}}},"name":"active_session"},{"layout":{"leaf":{"key":"0x17b57b06","ty":8}},"name":"collected_fee"}],"name":"TokenInfo"}},"root_key":"0x17b57b06"}},"name":"moto_owners"},{"layout":{"root":{"layout":{"struct":{"fields":[{"layout":{"enum":{"dispatchKey":"0x8c1e9f61","name":"Option","variants":{"0":{"fields":[],"name":"None"},"1":{"fields":[{"layout":{"leaf":{"key":"0x8c1e9f61","ty":0}},"name":"0"}],"name":"Some"}}}},"name":"owner_id"},{"layout":{"enum":{"dispatchKey":"0x8c1e9f61","name":"Option","variants":{"0":{"fields":[],"name":"None"},"1":{"fields":[{"layout":{"enum":{"dispatchKey":"0x8c1e9f61","name":"MotodexType","variants":{"0":{"fields":[{"layout":{"enum":{"dispatchKey":"0x8c1e9f61","name":"Moto","variants":{"0":{"fields":[],"name":"RedBuller"},"1":{"fields":[],"name":"ZebraGrrr"},"2":{"fields":[],"name":"RoboHorse"},"3":{"fields":[],"name":"MetalEyes"},"4":{"fields":[],"name":"BrownKiller"},"5":{"fields":[],"name":"CrazyLine"}}}},"name":"0"}],"name":"Moto"},"1":{"fields":[{"layout":{"enum":{"dispatchKey":"0x8c1e9f61","name":"Track","variants":{"0":{"fields":[],"name":"TrackLondon"},"1":{"fields":[],"name":"TrackDubai"},"2":{"fields":[],"name":"TrackAbuDhabi"},"3":{"fields":[],"name":"TrackBeijin"},"4":{"fields":[],"name":"TrackMoscow"},"5":{"fields":[],"name":"TrackMelburn"},"6":{"fields":[],"name":"TrackPeterburg"},"7":{"fields":[],"name":"TrackTaipei"},"8":{"fields":[],"name":"TrackPisa"},"9":{"fields":[],"name":"TrackIslamabad"}}}},"name":"0"}],"name":"Track"},"2":{"fields":[{"layout":{"enum":{"dispatchKey":"0x8c1e9f61","name":"HealthPill","variants":{"0":{"fields":[],"name":"HealthPill5"},"1":{"fields":[],"name":"HealthPill10"},"2":{"fields":[],"name":"HealthPill30"},"3":{"fields":[],"name":"HealthPill50"}}}},"name":"0"}],"name":"HealthPill"},"3":{"fields":[],"name":"MagicBox"}}}},"name":"0"}],"name":"Some"}}}},"name":"token_type"},{"layout":{"enum":{"dispatchKey":"0x8c1e9f61","name":"Option","variants":{"0":{"fields":[],"name":"None"},"1":{"fields":[{"layout":{"leaf":{"key":"0x8c1e9f61","ty":3}},"name":"0"}],"name":"Some"}}}},"name":"active_session"},{"layout":{"leaf":{"key":"0x8c1e9f61","ty":8}},"name":"collected_fee"}],"name":"TokenInfo"}},"root_key":"0x8c1e9f61"}},"name":"tracks_owners"},{"layout":{"leaf":{"key":"0x00000000","ty":4}},"name":"track_token_ids"},{"layout":{"leaf":{"key":"0x00000000","ty":7}},"name":"latest_epoch_update"},{"layout":{"leaf":{"key":"0x00000000","ty":8}},"name":"counter"}],"name":"Motodex"}},"root_key":"0x00000000"}},"types":[{"id":0,"type":{"def":{"composite":{"fields":[{"type":1,"typeName":"[u8; 32]"}]}},"path":["ink_primitives","types","AccountId"]}},{"id":1,"type":{"def":{"array":{"len":32,"type":2}}}},{"id":2,"type":{"def":{"primitive":"u8"}}},{"id":3,"type":{"def":{"primitive":"u32"}}},{"id":4,"type":{"def":{"sequence":{"type":3}}}},{"id":5,"type":{"def":{"tuple":[]}}},{"id":6,"type":{"def":{"sequence":{"type":0}}}},{"id":7,"type":{"def":{"primitive":"u64"}}},{"id":8,"type":{"def":{"primitive":"u128"}}},{"id":9,"type":{"def":{"primitive":"str"}}},{"id":10,"type":{"def":{"sequence":{"type":11}}}},{"id":11,"type":{"def":{"composite":{"fields":[{"name":"moto_owner_id","type":12,"typeName":"Option<AccountId>"},{"name":"moto_token_id","type":3,"typeName":"TokenId"},{"name":"last_track_time_result","type":7,"typeName":"MSDuration"}]}},"path":["motodex","motodex","GameSessionMoto"]}},{"id":12,"type":{"def":{"variant":{"variants":[{"index":0,"name":"None"},{"fields":[{"type":0}],"index":1,"name":"Some"}]}},"params":[{"name":"T","type":0}],"path":["Option"]}},{"id":13,"type":{"def":{"sequence":{"type":14}}}},{"id":14,"type":{"def":{"variant":{"variants":[{"fields":[{"type":15,"typeName":"SimplePayment"}],"index":0,"name":"Track"},{"fields":[{"type":15,"typeName":"SimplePayment"}],"index":1,"name":"Moto"},{"fields":[{"type":15,"typeName":"SimplePayment"}],"index":2,"name":"Bidder"},{"fields":[{"name":"track_token_id","type":3,"typeName":"TokenId"},{"name":"amount","type":8,"typeName":"Balance"}],"index":3,"name":"Platform"}]}},"path":["motodex","motodex","EpochPayment"]}},{"id":15,"type":{"def":{"composite":{"fields":[{"name":"track_token_id","type":3,"typeName":"TokenId"},{"name":"amount","type":8,"typeName":"Balance"},{"name":"receiver_id","type":12,"typeName":"Option<AccountId>"},{"name":"receiver_type","type":9,"typeName":"String"},{"name":"moto_token_id","type":16,"typeName":"Option<TokenId>"}]}},"path":["motodex","motodex","SimplePayment"]}},{"id":16,"type":{"def":{"variant":{"variants":[{"index":0,"name":"None"},{"fields":[{"type":3}],"index":1,"name":"Some"}]}},"params":[{"name":"T","type":3}],"path":["Option"]}},{"id":17,"type":{"def":{"sequence":{"type":18}}}},{"id":18,"type":{"def":{"composite":{"fields":[{"name":"amount","type":8,"typeName":"Balance"},{"name":"moto","type":3,"typeName":"TokenId"},{"name":"timestamp","type":7,"typeName":"Timestamp"},{"name":"bidder","type":12,"typeName":"Option<AccountId>"}]}},"path":["motodex","motodex","GameBid"]}},{"id":19,"type":{"def":{"variant":{"variants":[{"index":0,"name":"None"},{"fields":[{"type":8}],"index":1,"name":"Some"}]}},"params":[{"name":"T","type":8}],"path":["Option"]}},{"id":20,"type":{"def":{"variant":{"variants":[{"fields":[{"type":5}],"index":0,"name":"Ok"},{"fields":[{"type":21}],"index":1,"name":"Err"}]}},"params":[{"name":"T","type":5},{"name":"E","type":21}],"path":["Result"]}},{"id":21,"type":{"def":{"variant":{"variants":[{"index":1,"name":"CouldNotReadInput"}]}},"path":["ink_primitives","LangError"]}},{"id":22,"type":{"def":{"variant":{"variants":[{"fields":[{"type":3}],"index":0,"name":"Ok"},{"fields":[{"type":21}],"index":1,"name":"Err"}]}},"params":[{"name":"T","type":3},{"name":"E","type":21}],"path":["Result"]}},{"id":23,"type":{"def":{"variant":{"variants":[{"fields":[{"type":12}],"index":0,"name":"Ok"},{"fields":[{"type":21}],"index":1,"name":"Err"}]}},"params":[{"name":"T","type":12},{"name":"E","type":21}],"path":["Result"]}},{"id":24,"type":{"def":{"variant":{"variants":[{"fields":[{"type":25}],"index":0,"name":"Ok"},{"fields":[{"type":21}],"index":1,"name":"Err"}]}},"params":[{"name":"T","type":25},{"name":"E","type":21}],"path":["Result"]}},{"id":25,"type":{"def":{"primitive":"bool"}}},{"id":26,"type":{"def":{"variant":{"variants":[{"fields":[{"type":27}],"index":0,"name":"Ok"},{"fields":[{"type":21}],"index":1,"name":"Err"}]}},"params":[{"name":"T","type":27},{"name":"E","type":21}],"path":["Result"]}},{"id":27,"type":{"def":{"variant":{"variants":[{"fields":[{"type":5}],"index":0,"name":"Ok"},{"fields":[{"type":28}],"index":1,"name":"Err"}]}},"params":[{"name":"T","type":5},{"name":"E","type":28}],"path":["Result"]}},{"id":28,"type":{"def":{"variant":{"variants":[{"index":0,"name":"NotOwner"},{"index":1,"name":"NotApproved"},{"index":2,"name":"TokenExists"},{"index":3,"name":"TokenNotFound"},{"index":4,"name":"CannotInsert"},{"index":5,"name":"CannotFetchValue"},{"index":6,"name":"NotAllowed"}]}},"path":["motodex","motodex","Error"]}},{"id":29,"type":{"def":{"variant":{"variants":[{"fields":[{"type":16}],"index":0,"name":"Ok"},{"fields":[{"type":21}],"index":1,"name":"Err"}]}},"params":[{"name":"T","type":16},{"name":"E","type":21}],"path":["Result"]}},{"id":30,"type":{"def":{"variant":{"variants":[{"fields":[{"type":31,"typeName":"Moto"}],"index":0,"name":"Moto"},{"fields":[{"type":32,"typeName":"Track"}],"index":1,"name":"Track"},{"fields":[{"type":33,"typeName":"HealthPill"}],"index":2,"name":"HealthPill"},{"index":3,"name":"MagicBox"}]}},"path":["motodex","motodex","MotodexType"]}},{"id":31,"type":{"def":{"variant":{"variants":[{"index":0,"name":"RedBuller"},{"index":1,"name":"ZebraGrrr"},{"index":2,"name":"RoboHorse"},{"index":3,"name":"MetalEyes"},{"index":4,"name":"BrownKiller"},{"index":5,"name":"CrazyLine"}]}},"path":["motodex","motodex","Moto"]}},{"id":32,"type":{"def":{"variant":{"variants":[{"index":0,"name":"TrackLondon"},{"index":1,"name":"TrackDubai"},{"index":2,"name":"TrackAbuDhabi"},{"index":3,"name":"TrackBeijin"},{"index":4,"name":"TrackMoscow"},{"index":5,"name":"TrackMelburn"},{"index":6,"name":"TrackPeterburg"},{"index":7,"name":"TrackTaipei"},{"index":8,"name":"TrackPisa"},{"index":9,"name":"TrackIslamabad"}]}},"path":["motodex","motodex","Track"]}},{"id":33,"type":{"def":{"variant":{"variants":[{"index":0,"name":"HealthPill5"},{"index":1,"name":"HealthPill10"},{"index":2,"name":"HealthPill30"},{"index":3,"name":"HealthPill50"}]}},"path":["motodex","motodex","HealthPill"]}},{"id":34,"type":{"def":{"variant":{"variants":[{"fields":[{"type":35}],"index":0,"name":"Ok"},{"fields":[{"type":21}],"index":1,"name":"Err"}]}},"params":[{"name":"T","type":35},{"name":"E","type":21}],"path":["Result"]}},{"id":35,"type":{"def":{"variant":{"variants":[{"fields":[{"type":3}],"index":0,"name":"Ok"},{"fields":[{"type":28}],"index":1,"name":"Err"}]}},"params":[{"name":"T","type":3},{"name":"E","type":28}],"path":["Result"]}},{"id":36,"type":{"def":{"variant":{"variants":[{"fields":[{"type":8}],"index":0,"name":"Ok"},{"fields":[{"type":21}],"index":1,"name":"Err"}]}},"params":[{"name":"T","type":8},{"name":"E","type":21}],"path":["Result"]}},{"id":37,"type":{"def":{"variant":{"variants":[{"fields":[{"type":38}],"index":0,"name":"Ok"},{"fields":[{"type":21}],"index":1,"name":"Err"}]}},"params":[{"name":"T","type":38},{"name":"E","type":21}],"path":["Result"]}},{"id":38,"type":{"def":{"variant":{"variants":[{"fields":[{"type":2,"typeName":"u8"}],"index":0,"name":"U8"},{"fields":[{"type":39,"typeName":"u16"}],"index":1,"name":"U16"},{"fields":[{"type":3,"typeName":"u32"}],"index":2,"name":"U32"},{"fields":[{"type":7,"typeName":"u64"}],"index":3,"name":"U64"},{"fields":[{"type":8,"typeName":"u128"}],"index":4,"name":"U128"},{"fields":[{"type":40,"typeName":"vec::Vec<u8>"}],"index":5,"name":"Bytes"}]}},"path":["motodex","motodex","Id"]}},{"id":39,"type":{"def":{"primitive":"u16"}}},{"id":40,"type":{"def":{"sequence":{"type":2}}}},{"id":41,"type":{"def":{"variant":{"variants":[{"fields":[{"type":2}],"index":0,"name":"Ok"},{"fields":[{"type":21}],"index":1,"name":"Err"}]}},"params":[{"name":"T","type":2},{"name":"E","type":21}],"path":["Result"]}},{"id":42,"type":{"def":{"variant":{"variants":[{"fields":[{"type":4}],"index":0,"name":"Ok"},{"fields":[{"type":21}],"index":1,"name":"Err"}]}},"params":[{"name":"T","type":4},{"name":"E","type":21}],"path":["Result"]}},{"id":43,"type":{"def":{"variant":{"variants":[{"fields":[{"type":44}],"index":0,"name":"Ok"},{"fields":[{"type":21}],"index":1,"name":"Err"}]}},"params":[{"name":"T","type":44},{"name":"E","type":21}],"path":["Result"]}},{"id":44,"type":{"def":{"composite":{"fields":[{"name":"finished_at","type":7,"typeName":"MSDuration"},{"name":"track_token_id","type":3,"typeName":"TokenId"},{"name":"winner_account_id","type":12,"typeName":"Option<AccountId>"},{"name":"winner_token_id","type":3,"typeName":"TokenId"},{"name":"winner_result","type":7,"typeName":"MSDuration"},{"name":"total_attempts","type":2,"typeName":"u8"},{"name":"total_balance","type":8,"typeName":"Balance"},{"name":"payments","type":45,"typeName":"vec::Vec<EpochPaymentView>"}]}},"path":["motodex","motodex","FinalGameSessionView"]}},{"id":45,"type":{"def":{"sequence":{"type":46}}}},{"id":46,"type":{"def":{"composite":{"fields":[{"name":"track_token_id","type":3,"typeName":"TokenId"},{"name":"moto_token_id","type":16,"typeName":"Option<TokenId>"},{"name":"amount","type":8,"typeName":"Balance"},{"name":"to","type":12,"typeName":"Option<AccountId>"},{"name":"receiver_type","type":9,"typeName":"String"}]}},"path":["motodex","motodex","EpochPaymentView"]}},{"id":47,"type":{"def":{"variant":{"variants":[{"index":0,"name":"None"},{"fields":[{"type":7}],"index":1,"name":"Some"}]}},"params":[{"name":"T","type":7}],"path":["Option"]}},{"id":48,"type":{"def":{"variant":{"variants":[{"fields":[{"type":49}],"index":0,"name":"Ok"},{"fields":[{"type":21}],"index":1,"name":"Err"}]}},"params":[{"name":"T","type":49},{"name":"E","type":21}],"path":["Result"]}},{"id":49,"type":{"def":{"sequence":{"type":50}}}},{"id":50,"type":{"def":{"composite":{"fields":[{"name":"track_token_id","type":16,"typeName":"Option<TokenId>"},{"name":"track_type","type":51,"typeName":"Option<Track>"},{"name":"moto_token_id","type":16,"typeName":"Option<TokenId>"},{"name":"moto_type","type":52,"typeName":"Option<Moto>"},{"name":"owner_id","type":12,"typeName":"Option<AccountId>"},{"name":"active_session","type":16,"typeName":"Option<TokenId>"}]}},"path":["motodex","motodex","TokenIdOwnerType"]}},{"id":51,"type":{"def":{"variant":{"variants":[{"index":0,"name":"None"},{"fields":[{"type":32}],"index":1,"name":"Some"}]}},"params":[{"name":"T","type":32}],"path":["Option"]}},{"id":52,"type":{"def":{"variant":{"variants":[{"index":0,"name":"None"},{"fields":[{"type":31}],"index":1,"name":"Some"}]}},"params":[{"name":"T","type":31}],"path":["Option"]}},{"id":53,"type":{"def":{"composite":{"fields":[{"type":1,"typeName":"[u8; 32]"}]}},"path":["ink_primitives","types","Hash"]}},{"id":54,"type":{"def":{"variant":{}},"path":["ink_env","types","NoChainExtension"]}}],"version":"4"}
const contract = new ContractPromise(api, abi, "5EqN6wjxoF8ZfS1NQunkLCFYrG7cwMrgmhrBjCLssfSEri2V");
// the address to subtract the fees from
// const from = '5H8YFDBodQeqxkfFc9A5FkDAoha9jDycxrTNh2gXQ4yC2dJ6';
import {
BN
} from 'https://cdn.jsdelivr.net/npm/bn.js/+esm'
window.BN = BN
import {
web3Accounts, web3Enable, web3FromAddress
} from 'https://cdn.jsdelivr.net/npm/@polkadot/extension-dapp/+esm'
window.web3Enable = web3Enable
window.web3Accounts = web3Accounts
window.web3FromAddress = web3FromAddress
window.azcontract = contract
window.azapi = api
window.azGasLimit = api.registry.createType(
"WeightV2",
api.consts.system.blockWeights["maxBlock"]
)
// web3Enable('motoDEX')
// .then(() => {
// console.log('enabled', true);
//
// return web3Accounts({
// extensions: ["aleph-zero-signer"],
// genesisHash:
// "0x05d5279c52c484cc80396535a316add7d47b1c5b9e0398dd1f584149341460c5",
// });
// })
// .then(async (accounts) => {
// console.log('accounts:', JSON.stringify(accounts))
// const storageDepositLimit = null;
//
// const { gasRequired, storageDeposit, result, output } = await contract.query.totalSupply(
// from,
// {
// gasLimit :
// api.registry.createType(
// "WeightV2",
// api.consts.system.blockWeights["maxBlock"]
// ),
// storageDepositLimit,
// },
// );
// console.log(result.toHuman());
// console.log(gasRequired.toHuman());
//
// // console.log('callValue ',callValue);
// if (result.isOk) {
// // output the return value
// console.log('Success', output.toHuman());
// } else {
// console.error('Error', result.asErr);
// }
//
// const incValue = 0;
// const options = { storageDepositLimit: null, gasLimit: api.registry.createType(
// "WeightV2",
// api.consts.system.blockWeights["maxBlock"]
// ) }
//
// // const { gasRequired, storageDeposit, result } = await contract.query.updateCounter(
// // from,
// // options
// // );
// //
// // console.log(`outcome: ${result.isOk ? 'Ok' : 'Error'}`);
// // console.log(`gasRequired ${gasRequired.toString()}`);
// // const firstAddressInjector = await web3FromAddress(from);
// //
// //
// // const gasLimit = 3000n * 1000000n;
// // await contract.tx
// // .updateCounter({ storageDepositLimit, gasLimit })
// // .signAndSend(from, { signer: firstAddressInjector.signer }, result => {
// // if (result.status.isInBlock) {
// // console.log('in a block');
// // } else if (result.status.isFinalized) {
// // console.log('finalized');
// // }
// // });
//
// }
// );
</script>
<script type="module">
window.process = {}
window.process.env= {}
window.process.env.NODE_ENV= 'production'
// import {
// writeContract
// } from "https://unpkg.com/viem";
import {
EthereumClient,
w3mConnectors,
w3mProvider,
WagmiCore,
WagmiCoreChains,
WagmiCoreConnectors
} from 'https://unpkg.com/@web3modal/ethereum'
import { Web3Modal } from 'https://unpkg.com/@web3modal/html'
// Equivalent to importing from @wagmi/core
const { configureChains, createConfig, getAccount, getNetwork, fetchBalance, readContracts, readContract, writeContract, switchNetwork, fetchTransaction, waitForTransaction, getWebSocketPublicClient } = WagmiCore
// Equivalent to importing from @wagmi/core/chains
const { bscTestnet, aurora, auroraTestnet, polygon } = WagmiCoreChains
// Equivalent to importing from @wagmi/core/providers
const eos = {
id: 17777,
name: "EOS EVM",
network: "eos",
nativeCurrency: {
decimals: 18,
name: "EOS",
symbol: "EOS"
},
rpcUrls: {
default: {
http: ["https://api.evm.eosnetwork.com/"],
},
public: {
http: ["https://api.evm.eosnetwork.com/"]
}
},
blockExplorers: {
etherscan: {
name: "eos Scan",
url: "https://explorer.evm.eosnetwork.com/"
},
default: {
name: "eos Scan",
url: "https://explorer.evm.eosnetwork.com/"
}
}
};
const mantleTestnet = {
id: 5001,
name: "Mantle Testnet",
network: "mantleTestnet",
nativeCurrency: {
decimals: 18,
name: "tMNT",
symbol: "tMNT"
},
rpcUrls: {
default: {
http: ["https://rpc.testnet.mantle.xyz"],
},
public: {
http: ["https://rpc.testnet.mantle.xyz"]
}
},
blockExplorers: {
etherscan: {
name: "mantle Scan",
url: "https://explorer.testnet.mantle.xyz/"
},
default: {
name: "eos Scan",
url: "https://explorer.testnet.mantle.xyz/"
}
}
};
const mantle = {
id: 5000,
name: "Mantle",
network: "mantle",
nativeCurrency: {
decimals: 18,
name: "MNT",
symbol: "MNT"
},
rpcUrls: {
default: {
http: ["https://rpc.mantle.xyz"],
},
public: {
http: ["https://rpc.mantle.xyz"]
}
},
blockExplorers: {
etherscan: {
name: "mantle Scan",
url: "http://explorer.mantle.xyz/"
},
default: {
name: "eos Scan",
url: "https://explorer.mantle.xyz/"
}
}
};
const zetachainTestnet = {
id: 7001,
name: "ZetaChain Athens Testnet",
network: "zetachainTestnet",
nativeCurrency: {
decimals: 18,
name: "aZETA",
symbol: "aZETA"
},
rpcUrls: {
default: {
http: ["https://api.athens2.zetachain.com/evm"],
},
public: {
http: ["https://api.athens2.zetachain.com/evm"]
}
},
blockExplorers: {
etherscan: {
name: "eos Scan",
url: "https://explorer.athens.zetachain.com/"
},
default: {
name: "eos Scan",
url: "https://explorer.athens.zetachain.com/"
}
}
};
const skaleTestnet = {
id: 503129905,
name: "Skale Testnet",
network: "skaleTestnet",
nativeCurrency: {
decimals: 18,
name: "sFuel",
symbol: "sFuel"
},
rpcUrls: {
default: {
http: ["https://staging-v3.skalenodes.com/v1/staging-faint-slimy-achird"],
webSocket: ['wss://staging-v3.skalenodes.com/v1/ws/staging-faint-slimy-achird'],
},
public: {
http: ["https://staging-v3.skalenodes.com/v1/staging-faint-slimy-achird"],
webSocket: ['wss://staging-v3.skalenodes.com/v1/ws/staging-faint-slimy-achird']
}
},
blockExplorers: {
etherscan: {
name: "Skale Scan",
url: "https://staging-faint-slimy-achird.explorer.staging-v3.skalenodes.com/"
},
default: {
name: "Skale Scan",
url: "https://staging-faint-slimy-achird.explorer.staging-v3.skalenodes.com/"
}
}
};
const skaleMainnet = {
id: 1482601649,
name: "Skale Mainnet",
network: "skaleMainnet",
nativeCurrency: {
decimals: 18,
name: "sFuel",
symbol: "sFuel"
},
rpcUrls: {
default: {
http: ["https://mainnet.skalenodes.com/v1/green-giddy-denebola"],
webSocket: ['wss://mainnet.skalenodes.com/v1/ws/green-giddy-denebola'],
},
public: {
http: ["https://mainnet.skalenodes.com/v1/green-giddy-denebola"],
webSocket: ['wss://mainnet.skalenodes.com/v1/ws/green-giddy-denebola']
}
},
blockExplorers: {
etherscan: {
name: "Skale Scan",
url: "https://staging-faint-slimy-achird.explorer.staging-v3.skalenodes.com/"
},
default: {
name: "Skale Scan",
url: "https://staging-faint-slimy-achird.explorer.staging-v3.skalenodes.com/"
}
}
};
const klaytnTestnet = {
id: 1001,
name: "Klaytn Testnet Baobab",
network: "klaytnTestnet",
nativeCurrency: {
decimals: 18,
name: "KLAY",
symbol: "KLAY"
},
rpcUrls: {
default: {
http: ["https://api.baobab.klaytn.net:8651"],
},
public: {
http: ["https://api.baobab.klaytn.net:8651"]
}
},
blockExplorers: {
etherscan: {
name: "eos Scan",
url: "https://baobab.scope.klaytn.com/"
},
default: {
name: "eos Scan",
url: "https://baobab.scope.klaytn.com/"
}
}
};
const baseMainnet = {
id: 8453,
name: "Base Mainnet",
network: "baseMainnet",
nativeCurrency: {
decimals: 18,
name: "ETH",
symbol: "ETH"
},
rpcUrls: {
default: {
http: ["https://mainnet.base.org"],
},
public: {
http: ["https://mainnet.base.org"]
}
},
blockExplorers: {
etherscan: {
name: "eos Scan",
url: "https://basescan.org"
},
default: {
name: "eos Scan",
url: "https://basescan.org"
}
}
};
const mantaMainnet = {
id: 169,
name: "Manta Mainnet",
network: "mantaMainnet",
nativeCurrency: {
decimals: 18,
name: "ETH",
symbol: "ETH"
},
rpcUrls: {
default: {
http: ["https://pacific-rpc.manta.network/http"],
},
public: {
http: ["https://pacific-rpc.manta.network/http"]
}
},
blockExplorers: {
etherscan: {
name: "manta Scan",
url: "https://pacific-explorer.manta.network/"
},
default: {
name: "manta Scan",
url: "https://pacific-explorer.manta.network/"
}
}
};
const motodexTestnet = {
id: 1698905757615031,
name: "Motodex Testnet",
network: "motodex_t",
nativeCurrency: {
decimals: 18,
name: "OBS",
symbol: "OBS"
},
rpcUrls: {
default: {
http: ["https://motodex-1698905757615031-1.jsonrpc.testnet-sp1.sagarpc.io/"],
},
public: {
http: ["https://motodex-1698905757615031-1.jsonrpc.testnet-sp1.sagarpc.io/"]
}
},
blockExplorers: {
etherscan: {
name: "Motodex Scan",
url: "https://motodex-1698905757615031-1.testnet-sp1.sagaexplorer.io/"
},
default: {
name: "Motodex Scan",
url: "https://motodex-1698905757615031-1.testnet-sp1.sagaexplorer.io/"
}
}
};
const toposTestnet = {
id: 2359,
name: "Topos Testnet",
network: "topos_t",
nativeCurrency: {
decimals: 18,
name: "TOPOS",
symbol: "TOPOS"
},
rpcUrls: {
default: {
http: ["https://rpc.topos-subnet.testnet-1.topos.technology"],
},
public: {
http: ["https://rpc.topos-subnet.testnet-1.topos.technology"]
}
},
blockExplorers: {
etherscan: {
name: "Topos Scan",
url: "https://explorer.testnet-1.topos.technology/"
},
default: {
name: "Topos Scan",
url: "https://explorer.testnet-1.topos.technology/"
}
}
};
const qMainnet = {
id: 35441,
name: "Q Mainnet",
network: "q",
nativeCurrency: {
decimals: 18,
name: "Q",
symbol: "Q"
},
rpcUrls: {
default: {
http: ["https://rpc.q.org"],
},
public: {
http: ["https://rpc.q.org"]
}
},
blockExplorers: {
etherscan: {
name: "Q Scan",
url: "https://explorer.q.org/"
},
default: {
name: "Q Scan",
url: "https://explorer.q.org/"
}
}
};
const victionTestnet = {
id: 89,
name: "Viction Mainnet",
network: "viction_t",
nativeCurrency: {
decimals: 18,
name: "TOMO",
symbol: "TOMO"
},
rpcUrls: {
default: {
http: ["https://rpc.testnet.tomochain.com"],
},
public: {
http: ["https://rpc.testnet.tomochain.com"]
}
},
blockExplorers: {
etherscan: {
name: "Viction Scan",
url: "https://testnet.tomoscan.io/"
},
default: {
name: "Viction Scan",
url: "https://testnet.tomoscan.io/"
}
}
};
const kromaMainnet = {
id: 255,
name: "Kroma Mainnet",
network: "kroma",
nativeCurrency: {
decimals: 18,
name: "ETH",
symbol: "ETH"
},
rpcUrls: {
default: {
http: ["https://api.kroma.network"],
},
public: {
http: ["https://api.kroma.network"]
}
},
blockExplorers: {
etherscan: {
name: "Kroma Scan",
url: "https://blockscout.kroma.network/"
},
default: {
name: "Q Scan",
url: "https://blockscout.kroma.network/"
}
}
};
window.chains = [aurora, bscTestnet, auroraTestnet, polygon, eos, mantleTestnet, mantle, zetachainTestnet, skaleTestnet, skaleMainnet, klaytnTestnet, baseMainnet, mantaMainnet, motodexTestnet, toposTestnet, qMainnet, victionTestnet, kromaMainnet]
const projectId = 'd3d0c489a0d7d980f51628258bf880bd'
const { publicClient, webSocketPublicClient } = configureChains(chains, [w3mProvider({ projectId })])
const wagmiConfig = createConfig({
autoConnect: true,
connectors: w3mConnectors({ projectId, chains }),
publicClient,
webSocketPublicClient
})
const ethereumClient = new EthereumClient(wagmiConfig, chains)
window.web3modal = new Web3Modal({
projectId,
defaultChain: chains[0],
themeMode: 'dark'
}, ethereumClient, )
window.web3modal.setDefaultChain(chains[0])
window.waitForTransaction = waitForTransaction
window.fetchTransaction = fetchTransaction
window.switchNetwork = switchNetwork
window.getAccount = getAccount
window.getNetwork = getNetwork
window.fetchBalance = fetchBalance
window.readContracts = readContracts
window.readContract = readContract
window.getWebSocketPublicClient = getWebSocketPublicClient
window.writeContract = writeContract
</script>
<script>
var container = document.querySelector("#unity-container");
var canvas = document.querySelector("#unity-canvas");
var loadingBar = document.querySelector("#custom-loader");
var customLogo = document.querySelector("#custom-logo");
var mobileLogo = document.querySelector("#alert-custom-logo");
var fullscreenButton = document.querySelector("#unity-fullscreen-button");
var warningBanner = document.querySelector("#unity-warning");
// Shows a temporary message banner/ribbon for a few seconds, or
// a permanent error message on top of the canvas if type=='error'.
// If type=='warning', a yellow highlight color is used.
// Modify or remove this function to customize the visually presented
// way that non-critical warnings and error messages are presented to the
// user.
function unityShowBanner(msg, type) {
function updateBannerVisibility() {
warningBanner.style.display = warningBanner.children.length ? 'block' : 'none';
}
var div = document.createElement('div');
div.innerHTML = msg;
warningBanner.appendChild(div);
if (type == 'error') div.style = 'background: red; padding: 10px;';
else {
if (type == 'warning') div.style = 'background: yellow; padding: 10px;';
setTimeout(function() {
warningBanner.removeChild(div);
updateBannerVisibility();
}, 5000);
}
updateBannerVisibility();
}
function setLoaderProgressTo(value)
{
const fill = loadingBar.getElementsByClassName("progressBar")[0];
const fillText = loadingBar.getElementsByClassName("progressLabel")[0];
fill.animate(
[
{ width: (value * 100) + "%" }
],
{
duration: 300,
fill: "forwards"
}
);
fillText.textContent = (value * 100).toFixed() + "%";
}
var buildUrl = "Build";
var loaderUrl = buildUrl + "/motoDEXweb.loader.js";
var config = {
dataUrl: buildUrl + "/motoDEXweb.data.unityweb",
frameworkUrl: buildUrl + "/motoDEXweb.framework.js.unityweb",
codeUrl: buildUrl + "/motoDEXweb.wasm.unityweb",
streamingAssetsUrl: "StreamingAssets",
companyName: "OpenBiSea Studios",
productName: "MotoDEX",
productVersion: "1.0.6",
showBanner: unityShowBanner,
};
customLogo.style.display = "block";
container.appendChild(customLogo);
loadingBar.style.display = "block";
container.appendChild(loadingBar);
if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
mobileLogo.style.display = "block";
container.appendChild(mobileLogo);
var buyButton = document.getElementById("buyButton");
var myLink = "https://app.openbisea.com/motoDEX";
buyButton.addEventListener("click", function() {
window.location.href = myLink;
});
// Hide the desktop progress bar
loadingBar.style.display = "none";
}
var script = document.createElement("script");
script.src = loaderUrl;
script.onload = () => {
createUnityInstance(canvas, config, (progress) => {
setLoaderProgressTo(progress);
}).then((unityInstance) => {
loadingBar.style.display = "none";
if (!/iPhone|iPad|iPod|Android/i.test(navigator.userAgent))
{
customLogo.style.display = "none";
}
fullscreenButton.onclick = () => {
unityInstance.SetFullscreen(1);
};
}).catch((message) => {
alert(message);
});
};
document.body.appendChild(script);
</script>
<script type="text/javascript">
var container = document.querySelector("#unity-container");
var canvas = document.querySelector("#unity-canvas");
var resize = function() {
canvas.style.width = window.innerWidth + "px";
canvas.style.height = window.innerHeight + "px";
};
resize();
window.addEventListener("resize", resize);
</script>
</body>
</html>