tx · EeXa1H7q3wMDPQ2XGxe1HJejaQLkpDdYCkKptpbkivAQ

3N7a7sTSKaE621QewSqQcL1mUbknJjnLkZc:  -0.01000000 Waves

2021.10.20 17:02 [1754703] smart account 3N7a7sTSKaE621QewSqQcL1mUbknJjnLkZc > SELF 0.00000000 Waves

{ "type": 13, "id": "EeXa1H7q3wMDPQ2XGxe1HJejaQLkpDdYCkKptpbkivAQ", "fee": 1000000, "feeAssetId": null, "timestamp": 1634738604722, "version": 2, "chainId": 84, "sender": "3N7a7sTSKaE621QewSqQcL1mUbknJjnLkZc", "senderPublicKey": "6LrPmGtwuADhwHYcxBouLzwfSTGgucbwYG5Pja7LUrcd", "proofs": [ "5dX8ptXHV1CEQJ8MEFFwKQTwRezneT6ibxeZSVrC1YAgYnGxTum6Krszbndc46SmWgfyU5bUnKSFoCMxu5zJwTbK" ], "script": "base64:AAIFAAAAAAAAAAQIAhIAAAAAAAAAAAEAAAABaQEAAAAQc3RhcnRBc3NldEdhbWluZwAAAAAJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyAAAAAAAAAAABBQAAAAR1bml0BQAAAANuaWwAAAAAOiF7pg==", "height": 1754703, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6BjZjCVXbftdL7ZSt2RnhgbFJUCbPLBiuvwr4nAMKZnH Next: E75Exn7qDmvzUNREKtoUXYgzUWAt85P8Rc2ppbpPrvHS Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = "$GAME_NUMBER"
5-
6-let b = "$TEST"
7-
8-let c = 2
9-
10-let d = 1
11-
12-let e = 2
13-
14-func f (g,h) = (((g + "_") + toString(h)) + "_status")
154
165
17-func i (g,h) = (((g + "_") + toString(h)) + "_txid")
18-
19-
20-func j (g,h) = (((g + "_") + toString(h)) + "_fh")
21-
22-
23-func k (g,h) = (((g + "_") + toString(h)) + "_di")
24-
25-
26-func l (m) = {
27- let n = {
28- let o = getInteger(this, m)
29- if ($isInstanceOf(o, "Int"))
30- then {
31- let p = o
32- p
33- }
34- else 0
35- }
36- n
37- }
38-
39-
40-func q (r,s,t,u) = {
41- let v = value(blockInfoByHeight((t - 1)))
42- let w = sha256((s + value(v.vrf)))
43- (toInt(w, (u * 8)) % r)
44- }
45-
46-
47-func x (s,t) = {
48- let y = q(2, s, t, 0)
49- if ((y == 0))
50- then "type1"
51- else "type2"
52- }
53-
54-
55-@Callable(z)
56-func startAssetGaming () = {
57- let A = value(z.payments[0])
58- let h = l(a)
59-[IntegerEntry(f(toString(z.caller), h), d), StringEntry(i(toString(z.caller), h), toBase58String(z.transactionId)), IntegerEntry(j(toString(z.caller), h), (height + c)), IntegerEntry(a, (h + 1))]
60- }
61-
62-
63-
64-@Callable(z)
65-func finishAssetGaming (h) = {
66- let B = f(toString(z.caller), h)
67- let C = j(toString(z.caller), h)
68- let D = k(toString(z.caller), h)
69- let E = i(toString(z.caller), h)
70- let F = l(B)
71- let t = getIntegerValue(this, C)
72- let G = fromBase58String(getStringValue(this, E))
73- if ((F == e))
74- then {
75- let H = getStringValue(this, k(toString(z.caller), h))
76- throw(("The asset was gamed and claimed already, here is the folowing: " + H))
77- }
78- else if ((t > height))
79- then throw((((("Gaming is not finished yet " + toString((t - height))) + " blocks remaining, it will take around ") + toString((t - height))) + " minutes"))
80- else {
81- let I = x(G, t)
82- let J = Issue(I, I, 1, 0, false, unit, t)
83- let H = calculateAssetId(J)
84-[IntegerEntry(B, e), StringEntry(D, toBase58String(H)), StringEntry(toBase58String(H), D), J, ScriptTransfer(z.caller, 1, H)]
85- }
86- }
6+@Callable(a)
7+func startAssetGaming () = [ScriptTransfer(a.caller, 1, unit)]
878
889

github/deemru/w8io/169f3d6 
26.88 ms