tx · AfqZMB8M7w5gyxBeZGWS7Js1NTVEVfXi7pJjUUZrvryn

3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV:  -0.01000000 Waves

2021.12.08 19:05 [1825493] smart account 3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV > SELF 0.00000000 Waves

{ "type": 13, "id": "AfqZMB8M7w5gyxBeZGWS7Js1NTVEVfXi7pJjUUZrvryn", "fee": 1000000, "feeAssetId": null, "timestamp": 1638979553435, "version": 2, "chainId": 84, "sender": "3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV", "senderPublicKey": "5amLtMwixiEesBDKPy9dkFWntG2fNxhTs5n69JbQE9F7", "proofs": [ "2f4ThtvkdVVEesZJHEMXAMN3TGiBeGj1CoQbZuJGoChLjB38urijSukvEnZdBm1dQJRyFGngh8HvfXHhjnPVUor5" ], "script": "base64:AAIFAAAAAAAAABMIAhIAEgMKAQgSAwoBCBIDCgEIAAAAAQAAAAAFc2VwYXICAAAAAXwAAAAEAAAAAWkBAAAABXJlc2V0AAAAAAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACAgAAAApsYXN0Z2FtZWlkAgAAAAEwCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAICAAAAD2xhc3RjaGFsbGVuZ2VpZAIAAAABMAUAAAADbmlsAAAAAWkBAAAACXN0YXJ0Z2FtZQAAAAEAAAALY2hhbGxlbmdlaWQEAAAAA3BtdAMJAAAAAAAAAgkAAZAAAAABCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAkAAAIAAAABAgAAABVtdXN0IHN0YWtlIHNvbWUgd2F2ZXMDCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkCQAAAgAAAAECAAAAFXdvcmtzIHdpdGggd2F2ZXMgb25seQQAAAAMY2FsbGVyQWRyZXNzCQACWAAAAAEICA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mUoMTA1OCkAAAABCQABLAAAAAICAAAACmNoYWxsZW5nZS0FAAAADGNoYWxsZW5kZ2VpZAIAAAAABAAAAAljaGFsbGVuZ2UJAAS1AAAAAgkBAAAADGdldGNoYWxsZW5nZQAAAAEFAAAADGNoYWxsZW5kZ2VpZAUAAAAFc2VwYXIDCQAAZgAAAAIJAAGQAAAAAQUAAAAJY2hhbGxlbmdlAAAAAAAAAAAAAwkAAAAAAAACCQABkQAAAAIFAAAACWNoYWxsZW5nZQAAAAAAAAAAAAIAAAAIYXdhaXRpbmcJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACAgAAAApjaGFsbGVuZ2UtBQAAAAxjaGFsbGVuZGdlaWQJAAS5AAAAAgkABEwAAAACAgAAAAV1bnNldAkABEwAAAACCQABkQAAAAIFAAAACWNoYWxsZW5nZQAAAAAAAAAAAQkABEwAAAACCQABkQAAAAIFAAAACWNoYWxsZW5nZQAAAAAAAAAAAgkABEwAAAACCQABkQAAAAIFAAAACWNoYWxsZW5nZQAAAAAAAAAAAwUAAAADbmlsBQAAAAVzZXBhcgUAAAADbmlsCQAAAgAAAAECAAAAFGNoYWxsZW5nZSBub3QgZXhpc3RzCQAAAgAAAAECAAAAFGNoYWxsZW5nZSBub3QgZXhpc3RzAAAAALnhf1M=", "height": 1825493, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 69iPEeht2MuYBJcjMnvF4PzAEuDYpjfMvN7KR17xQK7L Next: Ds9KxLV24az8RMis5XerfUMDoT2cF1mVmccBTZTJmUDw Diff:
OldNewDifferences
2929 then f[1]
3030 else e
3131 let i = toString((parseIntValue(getStringValue("lastgameid")) + 1))
32-[StringEntry(("challenge-" + c), makeString([i, f[1], f[2], f[3], e], a)), StringEntry(i, makeString(["ongoing", h, g, f[3], "0", "white", "startblock", "laststepblock"], a)), StringEntry("lastgameid", i), ScriptTransfer(b.caller, (d.amount - parseIntValue(f[3])), unit)]
32+[StringEntry(("challenge-" + c), makeString([i, f[1], f[2], f[3], e], a)), StringEntry(("game-" + i), makeString(["ongoing", h, g, f[3], "0", "white", "startblock", "laststepblock"], a)), StringEntry("lastgameid", i), ScriptTransfer(b.caller, (d.amount - parseIntValue(f[3])), unit)]
3333 }
3434 else throw("no challenge awaiting")
3535 else throw("need more money")
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)
1212 func startgame (c) = {
1313 let d = if ((size(b.payments) == 1))
1414 then b.payments[0]
1515 else throw("must stake some waves")
1616 if (isDefined(d.assetId))
1717 then throw("works with waves only")
1818 else {
1919 let e = toBase58String(b.caller.bytes)
2020 let f = split(getStringValue(("challenge-" + c)), a)
2121 if ((size(f) > 0))
2222 then if ((d.amount >= parseIntValue(f[3])))
2323 then if ((f[0] == "awaiting"))
2424 then {
2525 let g = if ((f[2] == "black"))
2626 then f[1]
2727 else e
2828 let h = if ((f[2] == "white"))
2929 then f[1]
3030 else e
3131 let i = toString((parseIntValue(getStringValue("lastgameid")) + 1))
32-[StringEntry(("challenge-" + c), makeString([i, f[1], f[2], f[3], e], a)), StringEntry(i, makeString(["ongoing", h, g, f[3], "0", "white", "startblock", "laststepblock"], a)), StringEntry("lastgameid", i), ScriptTransfer(b.caller, (d.amount - parseIntValue(f[3])), unit)]
32+[StringEntry(("challenge-" + c), makeString([i, f[1], f[2], f[3], e], a)), StringEntry(("game-" + i), makeString(["ongoing", h, g, f[3], "0", "white", "startblock", "laststepblock"], a)), StringEntry("lastgameid", i), ScriptTransfer(b.caller, (d.amount - parseIntValue(f[3])), unit)]
3333 }
3434 else throw("no challenge awaiting")
3535 else throw("need more money")
3636 else throw("no challenge")
3737 }
3838 }
3939
4040
4141
4242 @Callable(b)
4343 func setchallenge (j) = if (if ((j == "black"))
4444 then true
4545 else (j == "white"))
4646 then {
4747 let d = if ((size(b.payments) == 1))
4848 then b.payments[0]
4949 else throw("must stake some waves")
5050 if (isDefined(d.assetId))
5151 then throw("works with waves only")
5252 else {
5353 let e = toBase58String(b.caller.bytes)
5454 let c = toString((parseIntValue(getStringValue("lastchallengeid")) + 1))
5555 [StringEntry(("challenge-" + c), makeString(["awaiting", e, j, toString(d.amount)], a)), StringEntry("lastchallengeid", c)]
5656 }
5757 }
5858 else throw("invalid side")
5959
6060
6161
6262 @Callable(b)
6363 func unsetchallenge (k) = {
6464 let e = toBase58String(b.caller.bytes)
6565 func l (k) = {
6666 let m = getString(("challenge-" + k))
6767 if ($isInstanceOf(m, "String"))
6868 then {
6969 let n = m
7070 getStringValue(("challenge-" + k))
7171 }
7272 else ""
7373 }
7474
7575 let o = split(l(k), a)
7676 if ((size(o) > 0))
7777 then if ((o[0] == "awaiting"))
7878 then [StringEntry(("challenge-" + k), makeString(["unset", o[1], o[2], o[3]], a))]
7979 else throw("challenge not exists")
8080 else throw("challenge not exists")
8181 }
8282
8383

github/deemru/w8io/169f3d6 
46.69 ms