tx · 7T2Bq9cFUWZJ9CELsMRJySSchaA3yikK6iiNgD4EWBeW 3N37A69qLQj49KGRgWhx9C8Zxb1UjHfL8os: -0.01400000 Waves 2020.07.21 14:54 [1097190] smart account 3N37A69qLQj49KGRgWhx9C8Zxb1UjHfL8os > SELF 0.00000000 Waves
{ "type": 13, "id": "7T2Bq9cFUWZJ9CELsMRJySSchaA3yikK6iiNgD4EWBeW", "fee": 1400000, "feeAssetId": null, "timestamp": 1595332478322, "version": 1, "sender": "3N37A69qLQj49KGRgWhx9C8Zxb1UjHfL8os", "senderPublicKey": "2H7prj9bMBS9xMv4iNhFyNLKx38JpRZ6tnf1GNHu9xUX", "proofs": [ "4wRK2K8WretERxMcQAsYhjcSgC1rVsD45yiNqBq4Gy5ZdpLktR5jMrAFjvcumMJDAy6jZGp4FdTeVLd8rby7DSre" ], "script": "base64:AAIDAAAAAAAAAA8IARIECgIBARIFCgMBAQEAAAAIAQAAAAlnZXRDb29yZHMAAAABAAAAA2tleQkABEwAAAACCQAEGgAAAAIFAAAABHRoaXMJAAEsAAAAAgIAAAAMcG9zaXRpb25MYXRfBQAAAANrZXkJAARMAAAAAgkABBoAAAACBQAAAAR0aGlzCQABLAAAAAICAAAADXBvc2l0aW9uTG9uZ18FAAAAA2tleQUAAAADbmlsAQAAAAlzZXRDb29yZHMAAAADAAAAA2tleQAAAAhsYXRpdHVkZQAAAAlsb25naXR1ZGUJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgIAAAAMcG9zaXRpb25MYXRfBQAAAANrZXkFAAAACGxhdGl0dWRlCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAICAAAADXBvc2l0aW9uTG9uZ18FAAAAA2tleQUAAAAJbG9uZ2l0dWRlBQAAAANuaWwBAAAAC3NldEdhbWVEYXRhAAAAAgAAAANpZDAAAAADaWQxBAAAAAZnYW1lSWQJAAEsAAAAAgkAASwAAAACBQAAAANpZDACAAAAAV8FAAAAA2lk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AAAFcGl0Y2gFAAAAA3lhdwUAAAAFZm9yY2UJAQAAAAhXcml0ZVNldAAAAAEJAQAAAA11bnNldEdhbWVEYXRhAAAAAQUAAAAGY2FsbGVyCQEAAAAIV3JpdGVTZXQAAAABCQEAAAAMY2hhbmdlUGxheWVyAAAAAQUAAAAGY2FsbGVyAAAAALDjtiQ=", "chainId": 84, "height": 1097190, "spentComplexity": 0 } View: original | compacted Prev: 5ehFhHmVg3aZJX7wthgQMpTNf9ctEcMYwXQzT5tbGrHS Next: FTjSYj5JvJfyn9D6smakoyRVSFFfZ4Pgj32fJorAKTvd Diff:
Old | New | Differences | |
---|---|---|---|
13 | 13 | } | |
14 | 14 | ||
15 | 15 | ||
16 | - | func j (b) = | |
16 | + | func j (b) = getString(this, ("gameId_" + b)) | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func k (g) = { | |
20 | - | let i = j(g) | |
20 | + | let i = value(j(g)) | |
21 | 21 | let h = getStringValue(this, ("opponent_" + g)) | |
22 | 22 | [DataEntry(("gameId_" + g), ""), DataEntry(("gameId_" + h), ""), DataEntry(("game_" + i), false), DataEntry(("gameTurn_" + i), "")] | |
23 | 23 | } | |
24 | 24 | ||
25 | 25 | ||
26 | - | func l (g) = if ((getStringValue(this, ("gameTurn_" + j(g))) == g)) | |
26 | + | func l (g) = if ((getStringValue(this, ("gameTurn_" + value(j(g)))) == g)) | |
27 | 27 | then true | |
28 | 28 | else false | |
29 | 29 | ||
30 | 30 | ||
31 | - | func m (g) = [DataEntry(("gameTurn_" + j(g)), getStringValue(this, ("opponent_" + g)))] | |
31 | + | func m (g) = [DataEntry(("gameTurn_" + value(j(g))), getStringValue(this, ("opponent_" + g)))] | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func n (o,p,q) = if ((o == p)) | |
41 | 41 | let s = toString(r.caller) | |
42 | 42 | let t = c(s, d, e) | |
43 | 43 | let u = getString(this, "openGame") | |
44 | - | if ((j(s) != "")) | |
44 | + | let i = j(s) | |
45 | + | if (if ((i != "")) | |
46 | + | then (i != unit) | |
47 | + | else false) | |
45 | 48 | then throw("Please finish your current game, before starting another one") | |
46 | 49 | else if (!(isDefined(u))) | |
47 | 50 | then WriteSet(DataEntry("openGame", s) :: t) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b) = [getInteger(this, ("positionLat_" + b)), getInteger(this, ("positionLong_" + b))] | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func c (b,d,e) = [DataEntry(("positionLat_" + b), d), DataEntry(("positionLong_" + b), e)] | |
8 | 8 | ||
9 | 9 | ||
10 | 10 | func f (g,h) = { | |
11 | 11 | let i = ((g + "_") + h) | |
12 | 12 | [DataEntry(("gameId_" + g), i), DataEntry(("opponent_" + g), h), DataEntry(("gameId_" + h), i), DataEntry(("opponent_" + h), g), DataEntry(("game_" + i), true), DataEntry(("gameTurn_" + i), g), DataEntry(("gameWinner_" + i), "")] | |
13 | 13 | } | |
14 | 14 | ||
15 | 15 | ||
16 | - | func j (b) = | |
16 | + | func j (b) = getString(this, ("gameId_" + b)) | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func k (g) = { | |
20 | - | let i = j(g) | |
20 | + | let i = value(j(g)) | |
21 | 21 | let h = getStringValue(this, ("opponent_" + g)) | |
22 | 22 | [DataEntry(("gameId_" + g), ""), DataEntry(("gameId_" + h), ""), DataEntry(("game_" + i), false), DataEntry(("gameTurn_" + i), "")] | |
23 | 23 | } | |
24 | 24 | ||
25 | 25 | ||
26 | - | func l (g) = if ((getStringValue(this, ("gameTurn_" + j(g))) == g)) | |
26 | + | func l (g) = if ((getStringValue(this, ("gameTurn_" + value(j(g)))) == g)) | |
27 | 27 | then true | |
28 | 28 | else false | |
29 | 29 | ||
30 | 30 | ||
31 | - | func m (g) = [DataEntry(("gameTurn_" + j(g)), getStringValue(this, ("opponent_" + g)))] | |
31 | + | func m (g) = [DataEntry(("gameTurn_" + value(j(g))), getStringValue(this, ("opponent_" + g)))] | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func n (o,p,q) = if ((o == p)) | |
35 | 35 | then true | |
36 | 36 | else false | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | @Callable(r) | |
40 | 40 | func startGame (d,e) = { | |
41 | 41 | let s = toString(r.caller) | |
42 | 42 | let t = c(s, d, e) | |
43 | 43 | let u = getString(this, "openGame") | |
44 | - | if ((j(s) != "")) | |
44 | + | let i = j(s) | |
45 | + | if (if ((i != "")) | |
46 | + | then (i != unit) | |
47 | + | else false) | |
45 | 48 | then throw("Please finish your current game, before starting another one") | |
46 | 49 | else if (!(isDefined(u))) | |
47 | 50 | then WriteSet(DataEntry("openGame", s) :: t) | |
48 | 51 | else if (if ((u == "")) | |
49 | 52 | then true | |
50 | 53 | else (u == s)) | |
51 | 54 | then WriteSet(DataEntry("openGame", s) :: t) | |
52 | 55 | else WriteSet([DataEntry("openGame", ""), t[0], t[1], f(value(u), s)]) | |
53 | 56 | } | |
54 | 57 | ||
55 | 58 | ||
56 | 59 | ||
57 | 60 | @Callable(r) | |
58 | 61 | func executeShot (o,p,q) = { | |
59 | 62 | let s = toString(r.caller) | |
60 | 63 | if (!(l(s))) | |
61 | 64 | then throw("please wait for your turn") | |
62 | 65 | else if (n(o, p, q)) | |
63 | 66 | then WriteSet(k(s)) | |
64 | 67 | else WriteSet(m(s)) | |
65 | 68 | } | |
66 | 69 | ||
67 | 70 |
github/deemru/w8io/169f3d6 47.34 ms ◑