tx · 7heRCqMrNb3Lbu9Xh22wu2TEvLTNt73gT5Jrqbo3of8n 3NC3ZeZYDpDR72ngL6CoC19ygSD9uGBW3fX: -0.01000000 Waves 2023.04.28 00:58 [2553547] smart account 3NC3ZeZYDpDR72ngL6CoC19ygSD9uGBW3fX > SELF 0.00000000 Waves
{ "type": 13, "id": "7heRCqMrNb3Lbu9Xh22wu2TEvLTNt73gT5Jrqbo3of8n", "fee": 1000000, "feeAssetId": null, "timestamp": 1682627664293, "version": 2, "chainId": 84, "sender": "3NC3ZeZYDpDR72ngL6CoC19ygSD9uGBW3fX", "senderPublicKey": "8jH62ceUHZbFsEBSPohAjv3Rzc8mw3QhZaUKhGHngY2J", "proofs": [ "g4hLdCRWvY8GtXi8Bm2YCVipVJQNV24AoeVFai281jquWS26guxFM5iYug95zm2yJTAFyWd1jsjkDnioFcr8SLp" ], "script": "base64:BgIOCAISABIAEgASBAoCEQEDAA50b3RhbE1hdGNoc0tleQIOdG90YWxNYXRjaHNLZXkBEHRyeUdldEludGVnZXJFeHQCB2FkZHJlc3MDa2V5BAckbWF0Y2gwCQCaCAIFB2FkZHJlc3MFA2tleQMJAAECBQckbWF0Y2gwAgNJbnQEAWEFByRtYXRjaDAFAWEAAAEJdHJ5R2V0SW50AQNrZXkJARB0cnlHZXRJbnRlZ2VyRXh0AgUEdGhpcwUDa2V5BAFpAQdteVRva2VuAAkAlAoCCQDMCAIJAMIIBQkArAICAgZUX3RjY18JAK8CAgkA2AQBCAgFAWkGY2FsbGVyBWJ5dGVzAAYCAACgjQYAAgYFA25pbAUEdW5pdAFpAQpjbGFpbVRva2VuAAQJcmVjaXBpZW50CAUBaQZjYWxsZXIEBXRva2VuCQDZBAECLEJUUGlDZUFFZDRFS2tDeXlSVGpETnczZnltRDdQdm9yNlBRQXlWUE4zMlpTCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMFCXJlY2lwaWVudADIAQUFdG9rZW4FA25pbAFpAQxkZXBvc2l0VG9rZW4ABAlyZWNpcGllbnQJANgEAQgIBQFpBmNhbGxlcgVieXRlcwQFdG9rZW4JANkEAQIsQlRQaUNlQUVkNEVLa0N5eVJUakROdzNmeW1EN1B2b3I2UFFBeVZQTjMyWlMJAMwIAgkBC1N0cmluZ0VudHJ5AgUJcmVjaXBpZW50AgMxMDAFA25pbAFpARF2ZXJpZmljYXJWZW5jZWRvcgIIc29sdWNvZXMJbnVtUGxheWVyBAlyZWNpcGllbnQIBQFpBmNhbGxlcgQFdG9rZW4JANkEAQIsQlRQaUNlQUVkNEVLa0N5eVJUakROdzNmeW1EN1B2b3I2UFFBeVZQTjMyWlMDCQEPY29udGFpbnNFbGVtZW50AgUIc29sdWNvZXMJAGgCAAMJAGQCBQludW1QbGF5ZXIAAQQNYW1vdW50TWF0Y2hlcwkAZAIJAQl0cnlHZXRJbnQBBQ50b3RhbE1hdGNoc0tleQABCQDMCAIJAQxJbnRlZ2VyRW50cnkCAglQYXJ0aWRhIE4FDWFtb3VudE1hdGNoZXMJAMwIAgkBC1N0cmluZ0VudHJ5AgIHSm9nYWRvcgIGR2FuaG91CQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMFCXJlY2lwaWVudACQAwUFdG9rZW4FA25pbAMDCQEPY29udGFpbnNFbGVtZW50AgUIc29sdWNvZXMAAwYJAQ9jb250YWluc0VsZW1lbnQCBQhzb2x1Y29lcwAGCQDMCAIJAQtTdHJpbmdFbnRyeQICB0pvZ2Fkb3ICBlBlcmRldQUDbmlsCQDMCAIJAQtTdHJpbmdFbnRyeQICBUFtYm9zAgZFbXBhdGUFA25pbACdz8U0", "height": 2553547, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5vXxXUK2uV9qFytkrghcaGHYUHnMPb8g1PxiyaV4Y35j Next: DgcrGsUYbEEYSgXMKVCX7e8VgHade4fmFmkizkwcTFsW Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let totalMatchsKey = "totalMatchsKey" | |
5 | 5 | ||
6 | 6 | func tryGetIntegerExt (address,key) = match getInteger(address, key) { | |
7 | 7 | case a: Int => | |
8 | 8 | a | |
9 | 9 | case _ => | |
10 | 10 | 0 | |
11 | 11 | } | |
12 | 12 | ||
13 | 13 | ||
14 | 14 | func tryGetInt (key) = tryGetIntegerExt(this, key) | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | @Callable(i) | |
18 | 18 | func myToken () = $Tuple2([Issue(("T_tcc_" + take(toBase58String(i.caller.bytes), 6)), "", 100000, 2, true)], unit) | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | ||
22 | 22 | @Callable(i) | |
23 | 23 | func claimToken () = { | |
24 | 24 | let recipient = i.caller | |
25 | 25 | let token = fromBase58String("BTPiCeAEd4EKkCyyRTjDNw3fymD7Pvor6PQAyVPN32ZS") | |
26 | 26 | [ScriptTransfer(recipient, 200, token)] | |
27 | 27 | } | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | ||
31 | 31 | @Callable(i) | |
32 | 32 | func depositToken () = { | |
33 | 33 | let recipient = toBase58String(i.caller.bytes) | |
34 | 34 | let token = fromBase58String("BTPiCeAEd4EKkCyyRTjDNw3fymD7Pvor6PQAyVPN32ZS") | |
35 | 35 | [StringEntry(recipient, "100")] | |
36 | 36 | } | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | ||
40 | 40 | @Callable(i) | |
41 | 41 | func verificarVencedor (solucoes,numPlayer) = { | |
42 | 42 | let recipient = i.caller | |
43 | 43 | let token = fromBase58String("BTPiCeAEd4EKkCyyRTjDNw3fymD7Pvor6PQAyVPN32ZS") | |
44 | 44 | if (containsElement(solucoes, (3 * (numPlayer + 1)))) | |
45 | 45 | then { | |
46 | 46 | let amountMatches = (tryGetInt(totalMatchsKey) + 1) | |
47 | 47 | [IntegerEntry("Partida N", amountMatches), StringEntry("Jogador", "Ganhou"), ScriptTransfer(recipient, 400, token)] | |
48 | 48 | } | |
49 | 49 | else if (if (containsElement(solucoes, 3)) | |
50 | 50 | then true | |
51 | 51 | else containsElement(solucoes, 6)) | |
52 | 52 | then [StringEntry("Jogador", "Perdeu")] | |
53 | 53 | else [StringEntry("Ambos", "Empate")] | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 |
github/deemru/w8io/026f985 27.38 ms ◑