tx · 25WvUy1u3nNvmdtSEsLmqGQbgeBMi14Lc6PKtwihd7ra

3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV:  -0.01000000 Waves

2021.12.09 11:27 [1826461] smart account 3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV > SELF 0.00000000 Waves

{ "type": 13, "id": "25WvUy1u3nNvmdtSEsLmqGQbgeBMi14Lc6PKtwihd7ra", "fee": 1000000, "feeAssetId": null, "timestamp": 1639038478990, "version": 2, "chainId": 84, "sender": "3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV", "senderPublicKey": "5amLtMwixiEesBDKPy9dkFWntG2fNxhTs5n69JbQE9F7", "proofs": [ "2TA1jGBC9SSnNxLNyV7roZ1fWujx7J5bjdxQBodCqSsKpqjug7wnmJi76qYTZnWbXpH1PYWzTaEaSVVBXoUruVzX" ], "script": "base64:AAIFAAAAAAAAABwIAhIAEgASBQoDCAgIEgMKAQgSAwoBCBIDCgEIAAAAAQAAAAAFc2VwYXICAAAAAXwAAAAGAAAAAWkBAAAABXJlc2V0AAAAAAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACAgAAAApsYXN0Z2FtZWlkAgAAAAEwCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAICAAAAD2xhc3RjaGFsbGVuZ2VpZAIAAAABMAUAAAADbmlsAAAAAWkBAAAACHNldHJ1bGVzAAAAAAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACAgAAAARtYmYrAgAAAAotMSwtMXwxLC0xCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAICAAAABG1iZi0CAAAAAAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACAgAAAARtd2YrAgAAAAgtMSwxfDEsMQkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACAgAAAARtd2YtAgAAAAAFAAAAA25pbAAAAAFpAQAAAARtb3ZlAAAAAwAAAAZnYW1laWQAAAAEZnJvbQAAAA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bmdFbnRyeQAAAAIJAAEsAAAAAgIAAAAKY2hhbGxlbmdlLQUAAAAMY2hhbGxlbmRnZWlkCQAEuQAAAAIJAARMAAAAAgIAAAAFdW5zZXQJAARMAAAAAgkAAZEAAAACBQAAAAljaGFsbGVuZ2UAAAAAAAAAAAEJAARMAAAAAgkAAZEAAAACBQAAAAljaGFsbGVuZ2UAAAAAAAAAAAIJAARMAAAAAgkAAZEAAAACBQAAAAljaGFsbGVuZ2UAAAAAAAAAAAMFAAAAA25pbAUAAAAFc2VwYXIFAAAAA25pbAkAAAIAAAABAgAAABRjaGFsbGVuZ2Ugbm90IGV4aXN0cwkAAAIAAAABAgAAABRjaGFsbGVuZ2Ugbm90IGV4aXN0cwAAAADAFgkh", "height": 1826461, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8y2C3N3BzQKupBcKKues5evvGR3kara3EbGrfG9wPDHW Next: GZMrG7JyroYqqGmd9FjGxe9S8JVQQzSqJHRAXCeKw5Us Diff:
OldNewDifferences
99
1010
1111 @Callable(b)
12-func setrules () = [StringEntry("mb+", "-1,-1|1,-1"), StringEntry("mb-", ""), StringEntry("mw+", "-1,1|1,1"), StringEntry("mb-", "")]
12+func setrules () = [StringEntry("mbf+", "-1,-1|1,-1"), StringEntry("mbf-", ""), StringEntry("mwf+", "-1,1|1,1"), StringEntry("mwf-", "")]
1313
1414
1515
6060 then "e"
6161 else throw("can not eat himself")
6262 let t = ((toString((n - p)) + ",") + toString((o - q)))
63- let u = split(getStringValue((s + r)), "|")
63+ let u = split(getStringValue(((s + i) + r)), "|")
6464 let v = if (containsElement(u, t))
6565 then true
6666 else throw("incorrect movement")
6767 if (v)
68- then [StringEntry("_", "figure")]
68+ then [StringEntry("_", "possible")]
6969 else [StringEntry("_", "_")]
7070 }
7171 else throw("Strict value is not equal to itself.")
105105 else g
106106 let c = toString((parseIntValue(getStringValue("lastgameid")) + 1))
107107 [StringEntry(("challenge-" + w), makeString([c, y[1], y[2], y[3], g], a)), {
108- let l = "wl-wh-we-wf-wq-we-wh-wl!wp-wp-wp-wp-wp-wp-wp-wp!00-00-00-00-00-00-00-00!00-00-00-00-00-00-00-00!00-00-00-00-00-00-00-00!00-00-00-00-00-00-00-00!bp-bp-bp-bp-bp-bp-bp-bp!bl-bh-be-bf-bq-be-bh-bl"
108+ let l = "wf-00-wf-00-wf-00-wf-00!00-wf-00-wf-00-wf-00-wf!wf-00-wf-00-wf-00-wf-00!00-00-00-00-00-00-00-00!00-00-00-00-00-00-00-00!00-bf-00-bf-00-bf-00-bf!bf-00-bf-00-bf-00-bf-00!00-bf-00-bf-00-bf-00-bf"
109109 StringEntry(("game-" + c), makeString(["ongoing", A, z, y[3], "0", "w", "startblock", "laststepblock", l], a))
110110 }, StringEntry("lastgameid", c), ScriptTransfer(b.caller, (x.amount - parseIntValue(y[3])), unit)]
111111 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "|"
55
66 @Callable(b)
77 func reset () = [StringEntry("lastgameid", "0"), StringEntry("lastchallengeid", "0")]
88
99
1010
1111 @Callable(b)
12-func setrules () = [StringEntry("mb+", "-1,-1|1,-1"), StringEntry("mb-", ""), StringEntry("mw+", "-1,1|1,1"), StringEntry("mb-", "")]
12+func setrules () = [StringEntry("mbf+", "-1,-1|1,-1"), StringEntry("mbf-", ""), StringEntry("mwf+", "-1,1|1,1"), StringEntry("mwf-", "")]
1313
1414
1515
1616 @Callable(b)
1717 func move (c,d,e) = {
1818 let f = split(getStringValue(("game-" + c)), a)
1919 if ((f == f))
2020 then {
2121 let g = toBase58String(b.caller.bytes)
2222 if ((g == g))
2323 then {
2424 let h = if ((f[0] == "ongoing"))
2525 then true
2626 else throw("not ongoing game")
2727 if ((h == h))
2828 then {
2929 let i = if (if (h)
3030 then if ((f[1] == g))
3131 then true
3232 else (f[2] == g)
3333 else false)
3434 then if ((f[1] == g))
3535 then "w"
3636 else "b"
3737 else throw("not gamer")
3838 if ((i == i))
3939 then {
4040 let j = if ((i == "w"))
4141 then "b"
4242 else "w"
4343 let k = if ((i == f[5]))
4444 then true
4545 else throw("not your turn")
4646 if ((k == k))
4747 then {
4848 let l = split(f[8], "!")
4949 let m = [split(l[0], "-"), split(l[1], "|"), split(l[2], "|"), split(l[3], "|"), split(l[4], "|"), split(l[5], "|"), split(l[6], "|"), split(l[7], "|")]
5050 if ((m == m))
5151 then {
5252 let n = parseIntValue(take(d, 1))
5353 let o = parseIntValue(takeRight(d, 1))
5454 let p = parseIntValue(take(e, 1))
5555 let q = parseIntValue(takeRight(e, 1))
5656 let r = takeRight(m[n][o], 1)
5757 let s = if ((take(m[p][q], 1) == "0"))
5858 then "m"
5959 else if ((take(m[p][q], 1) == j))
6060 then "e"
6161 else throw("can not eat himself")
6262 let t = ((toString((n - p)) + ",") + toString((o - q)))
63- let u = split(getStringValue((s + r)), "|")
63+ let u = split(getStringValue(((s + i) + r)), "|")
6464 let v = if (containsElement(u, t))
6565 then true
6666 else throw("incorrect movement")
6767 if (v)
68- then [StringEntry("_", "figure")]
68+ then [StringEntry("_", "possible")]
6969 else [StringEntry("_", "_")]
7070 }
7171 else throw("Strict value is not equal to itself.")
7272 }
7373 else throw("Strict value is not equal to itself.")
7474 }
7575 else throw("Strict value is not equal to itself.")
7676 }
7777 else throw("Strict value is not equal to itself.")
7878 }
7979 else throw("Strict value is not equal to itself.")
8080 }
8181 else throw("Strict value is not equal to itself.")
8282 }
8383
8484
8585
8686 @Callable(b)
8787 func startgame (w) = {
8888 let x = if ((size(b.payments) == 1))
8989 then b.payments[0]
9090 else throw("must stake some waves")
9191 if (isDefined(x.assetId))
9292 then throw("works with waves only")
9393 else {
9494 let g = toBase58String(b.caller.bytes)
9595 let y = split(getStringValue(("challenge-" + w)), a)
9696 if ((size(y) > 0))
9797 then if ((x.amount >= parseIntValue(y[3])))
9898 then if ((y[0] == "awaiting"))
9999 then {
100100 let z = if ((y[2] == "b"))
101101 then y[1]
102102 else g
103103 let A = if ((y[2] == "w"))
104104 then y[1]
105105 else g
106106 let c = toString((parseIntValue(getStringValue("lastgameid")) + 1))
107107 [StringEntry(("challenge-" + w), makeString([c, y[1], y[2], y[3], g], a)), {
108- let l = "wl-wh-we-wf-wq-we-wh-wl!wp-wp-wp-wp-wp-wp-wp-wp!00-00-00-00-00-00-00-00!00-00-00-00-00-00-00-00!00-00-00-00-00-00-00-00!00-00-00-00-00-00-00-00!bp-bp-bp-bp-bp-bp-bp-bp!bl-bh-be-bf-bq-be-bh-bl"
108+ let l = "wf-00-wf-00-wf-00-wf-00!00-wf-00-wf-00-wf-00-wf!wf-00-wf-00-wf-00-wf-00!00-00-00-00-00-00-00-00!00-00-00-00-00-00-00-00!00-bf-00-bf-00-bf-00-bf!bf-00-bf-00-bf-00-bf-00!00-bf-00-bf-00-bf-00-bf"
109109 StringEntry(("game-" + c), makeString(["ongoing", A, z, y[3], "0", "w", "startblock", "laststepblock", l], a))
110110 }, StringEntry("lastgameid", c), ScriptTransfer(b.caller, (x.amount - parseIntValue(y[3])), unit)]
111111 }
112112 else throw("no challenge awaiting")
113113 else throw("need more money")
114114 else throw("no challenge")
115115 }
116116 }
117117
118118
119119
120120 @Callable(b)
121121 func setchallenge (i) = if (if ((i == "b"))
122122 then true
123123 else (i == "w"))
124124 then {
125125 let x = if ((size(b.payments) == 1))
126126 then b.payments[0]
127127 else throw("must stake some waves")
128128 if (isDefined(x.assetId))
129129 then throw("works with waves only")
130130 else {
131131 let g = toBase58String(b.caller.bytes)
132132 let w = toString((parseIntValue(getStringValue("lastchallengeid")) + 1))
133133 [StringEntry(("challenge-" + w), makeString(["awaiting", g, i, toString(x.amount)], a)), StringEntry("lastchallengeid", w)]
134134 }
135135 }
136136 else throw("invalid side")
137137
138138
139139
140140 @Callable(b)
141141 func unsetchallenge (B) = {
142142 let g = toBase58String(b.caller.bytes)
143143 func C (B) = {
144144 let D = getString(("challenge-" + B))
145145 if ($isInstanceOf(D, "String"))
146146 then {
147147 let E = D
148148 getStringValue(("challenge-" + B))
149149 }
150150 else ""
151151 }
152152
153153 let F = split(C(B), a)
154154 if ((size(F) > 0))
155155 then if ((F[0] == "awaiting"))
156156 then [StringEntry(("challenge-" + B), makeString(["unset", F[1], F[2], F[3]], a))]
157157 else throw("challenge not exists")
158158 else throw("challenge not exists")
159159 }
160160
161161

github/deemru/w8io/026f985 
35.81 ms