tx · AukX1ALS9qG9MWq36y3Ys6cYQGtE1TYtRvgGdtwytqMB

3N7a7sTSKaE621QewSqQcL1mUbknJjnLkZc:  -0.01000000 Waves

2021.10.21 22:17 [1756462] smart account 3N7a7sTSKaE621QewSqQcL1mUbknJjnLkZc > SELF 0.00000000 Waves

{ "type": 13, "id": "AukX1ALS9qG9MWq36y3Ys6cYQGtE1TYtRvgGdtwytqMB", "fee": 1000000, "feeAssetId": null, "timestamp": 1634843847013, "version": 2, "chainId": 84, "sender": "3N7a7sTSKaE621QewSqQcL1mUbknJjnLkZc", "senderPublicKey": "6LrPmGtwuADhwHYcxBouLzwfSTGgucbwYG5Pja7LUrcd", "proofs": [ "28M6o8zaKWFxk4XFkX1FtdkMdhezL7iqUXo9SK19CJvCmUYi5sT3rs2JpM3iuJ5aMgGxFGU7GbVJzKEzjBGYJDsC" ], "script": "base64:AAIFAAAAAAAAAAgIAhIECgIIGAAAAAAAAAABAAAAAWkBAAAAC2NyZWF0ZU9mZmVyAAAAAgAAAAl0b0FkZHJlc3MAAAAFYXNzZXQEAAAADGZpcnN0UGF5bWVudAkBAAAABXZhbHVlAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIFAAAACXRvQWRkcmVzcwIAAAAFYXNzZXQJAAEsAAAAAgkAASwAAAACBQAAAAl0b0FkZHJlc3MJAAGRAAAAAgUAAAAFYXNzZXQAAAAAAAAAAAAJAAGRAAAAAgUAAAAFYXNzZXQAAAAAAAAAAAEFAAAAA25pbAAAAAAJBY/O", "height": 1756462, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FfRPkqTX516SnHptKsFASDTMvzn7nqomQqfbEY8QJmV4 Next: EUefa87Rb7Vh4C1VyTc9aZxkknapHdrq3vdAE975CNgX 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- }
6+@Callable(a)
7+func createOffer (b,c) = {
8+ let d = value(a.payments[0])
9+[StringEntry((b + "asset"), ((b + c[0]) + c[1]))]
8610 }
8711
8812

github/deemru/w8io/169f3d6 
32.45 ms