tx · AHCaoKqip5RD8RJ1LFAbZiJ95wNEy87nj4m9rD3MYehV 3Mt71RiSbWYENDmeyndvwjoJZwUsXfUkR6b: -0.01400000 Waves 2021.02.06 10:44 [1386047] smart account 3Mt71RiSbWYENDmeyndvwjoJZwUsXfUkR6b > SELF 0.00000000 Waves
{ "type": 13, "id": "AHCaoKqip5RD8RJ1LFAbZiJ95wNEy87nj4m9rD3MYehV", "fee": 1400000, "feeAssetId": null, "timestamp": 1612597482528, "version": 2, "chainId": 84, "sender": "3Mt71RiSbWYENDmeyndvwjoJZwUsXfUkR6b", "senderPublicKey": "3BKFQLeo5ExZ5Y1pt9Ftzsno7aRwzD96zoYVHP3tcLgV", "proofs": [ "3zcdSvksm8gs4Q1eJhoYmAc6oq5q2mUJVUsAcW9NiQu1yTSZRnzKdxnjdHArnn8QCsazmJrHqMfeWDiQnuLseqn" ], "script": "base64:AAIDAAAAAAAAABAIARIHCgUBAQEBCBIDCgEIAAAACwAAAAARbG90dGVyeXBvb2xhbW91bnQCAAAAEF9sb3R0ZXJ5X2Ftb3VudF8AAAAAFmxvdHRlcnlwb29scHJvYmFiaWxpdHkCAAAAFV9sb3R0ZXJ5X3Byb2JhYmlsaXR5XwAAAAAdbG90dGVyeXBvb2xwcm9iYWJpbGl0eWRlY2ltYWwCAAAAHV9sb3R0ZXJ5X3Byb2JhYmlsaXR5X2RlY2ltYWxfAAAAABBsb3R0ZXJ5cG9vbHByaWNlAgAAAA9fbG90dGVyeV9wcmljZV8AAAAADWxvdHRlcnlwcmljZXMCAAAAEF9sb3R0ZXJ5X3ByaWNlc18AAAAADGxhc3RIYXNoUmFuZAIAAAARX2hhc2hfbGFzdF9yb3VuZF8AAAAADWxhc3RQbGF5Um91bmQCAAAAFl9sYXN0X3BsYXlfcm91bmRfX2hhc2gBAAAACnJhbmRvbWl6ZXIAAAABAAAAA2ludgQAAAAIbGFzdFBsYXkEAAAAByRtYXRjaDAJAAQcAAAAAgUAAAAEdGhpcwUAAAANbGFzdF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EAAAAJRGF0YUVudHJ5AAAAAgUAAAANbGFzdFBsYXlSb3VuZAUAAAAIcmFuZGhhc2gJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAANbGFzdFBsYXlSb3VuZAIAAAAJIF9pbnRlZ2VyCQAEsQAAAAEFAAAACHJhbmRoYXNoCQAETAAAAAIFAAAAEWRhdFNpemVQcmljZUVudHJ5BQAAAANuaWwJAQAAAAxTY3JpcHRSZXN1bHQAAAACBQAAAAl3cml0ZVNldHMJAQAAAAtUcmFuc2ZlclNldAAAAAEFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24GAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgYJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5IOmPaQ==", "height": 1386047, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3r5uhb6FoSRytjRGU7SDD8LEEhNsYVTiLDNh7BQMCtSo Next: HYxLkNvPh2JACCeDg2ueQEduxhDpcmYK3xpu3SXrgkNg Diff:
Old | New | Differences | |
---|---|---|---|
24 | 24 | l | |
25 | 25 | } | |
26 | 26 | else if ($isInstanceOf(k, "Unit")) | |
27 | - | then base58' | |
27 | + | then base58'2ee4oFDYriWJ9EMeR' | |
28 | 28 | else throw("Match error") | |
29 | 29 | } | |
30 | 30 | let m = (((((j + i.transactionId) + i.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "_lottery_amount_" | |
5 | 5 | ||
6 | 6 | let b = "_lottery_probability_" | |
7 | 7 | ||
8 | 8 | let c = "_lottery_probability_decimal_" | |
9 | 9 | ||
10 | 10 | let d = "_lottery_price_" | |
11 | 11 | ||
12 | 12 | let e = "_lottery_prices_" | |
13 | 13 | ||
14 | 14 | let f = "_hash_last_round_" | |
15 | 15 | ||
16 | 16 | let g = "_last_play_round__hash" | |
17 | 17 | ||
18 | 18 | func h (i) = { | |
19 | 19 | let j = { | |
20 | 20 | let k = getBinary(this, g) | |
21 | 21 | if ($isInstanceOf(k, "ByteVector")) | |
22 | 22 | then { | |
23 | 23 | let l = k | |
24 | 24 | l | |
25 | 25 | } | |
26 | 26 | else if ($isInstanceOf(k, "Unit")) | |
27 | - | then base58' | |
27 | + | then base58'2ee4oFDYriWJ9EMeR' | |
28 | 28 | else throw("Match error") | |
29 | 29 | } | |
30 | 30 | let m = (((((j + i.transactionId) + i.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height)) | |
31 | 31 | sha256(m) | |
32 | 32 | } | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | func n () = { | |
36 | 36 | let o = getStringValue(this, e) | |
37 | 37 | let p = take(o, (size(o) - 1)) | |
38 | 38 | let q = split(p, ",") | |
39 | 39 | size(q) | |
40 | 40 | } | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func r () = { | |
44 | 44 | let o = getStringValue(this, e) | |
45 | 45 | let p = take(o, (size(o) - 1)) | |
46 | 46 | split(p, ",") | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func s (t,u) = { | |
51 | 51 | let v = getIntegerValue(this, (a + t)) | |
52 | 52 | if ((v == 0)) | |
53 | 53 | then throw("Amount exceeded") | |
54 | 54 | else if ((u == true)) | |
55 | 55 | then { | |
56 | 56 | let w = (v - 1) | |
57 | 57 | w | |
58 | 58 | } | |
59 | 59 | else v | |
60 | 60 | } | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | @Callable(x) | |
64 | 64 | func updateprobability (y,z,A,B,t) = { | |
65 | 65 | let C = { | |
66 | 66 | let k = getString(this, e) | |
67 | 67 | if ($isInstanceOf(k, "String")) | |
68 | 68 | then { | |
69 | 69 | let D = k | |
70 | 70 | D | |
71 | 71 | } | |
72 | 72 | else "" | |
73 | 73 | } | |
74 | 74 | let E = indexOf(C, t) | |
75 | 75 | let F = { | |
76 | 76 | let k = E | |
77 | 77 | if ($isInstanceOf(k, "Unit")) | |
78 | 78 | then ((C + t) + ",") | |
79 | 79 | else if ($isInstanceOf(k, "Int")) | |
80 | 80 | then { | |
81 | 81 | let G = k | |
82 | 82 | C | |
83 | 83 | } | |
84 | 84 | else throw("Match error") | |
85 | 85 | } | |
86 | 86 | let H = WriteSet([DataEntry((a + t), z), DataEntry((b + t), y), DataEntry((d + t), A), DataEntry(e, F), DataEntry((c + t), B)]) | |
87 | 87 | ScriptResult(H, TransferSet(nil)) | |
88 | 88 | } | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | ||
92 | 92 | @Callable(x) | |
93 | 93 | func startlotto (t) = { | |
94 | 94 | let I = toBase58String(x.caller.bytes) | |
95 | 95 | let J = getIntegerValue(this, (a + t)) | |
96 | 96 | let K = getIntegerValue(this, (b + t)) | |
97 | 97 | let L = getIntegerValue(this, (d + t)) | |
98 | 98 | let M = getIntegerValue(this, (c + t)) | |
99 | 99 | let N = h(x) | |
100 | 100 | let O = n() | |
101 | 101 | let P = r() | |
102 | 102 | let Q = DataEntry((I + "_winprices_size_"), O) | |
103 | 103 | let R = 1000 | |
104 | 104 | let S = (toInt(N) % (M * 1000)) | |
105 | 105 | if ((K > S)) | |
106 | 106 | then { | |
107 | 107 | let T = TransferSet([ScriptTransfer(x.caller, L, unit)]) | |
108 | 108 | let U = s(t, true) | |
109 | 109 | let V = WriteSet([DataEntry((I + "_winning_ticket_"), L), DataEntry((I + "_wininning_address_"), I), DataEntry((a + t), U), DataEntry(f, S), DataEntry(g, N), DataEntry((g + " _integer"), toInt(N)), Q]) | |
110 | 110 | ScriptResult(V, T) | |
111 | 111 | } | |
112 | 112 | else { | |
113 | 113 | let U = s(t, true) | |
114 | 114 | let V = WriteSet([DataEntry((I + "_winning_ticket_"), ""), DataEntry((I + "_wininning_address_"), ""), DataEntry((a + t), U), DataEntry(f, S), DataEntry(g, N), DataEntry((g + " _integer"), toInt(N)), Q]) | |
115 | 115 | ScriptResult(V, TransferSet(nil)) | |
116 | 116 | } | |
117 | 117 | } | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | @Verifier(W) | |
121 | 121 | func X () = { | |
122 | 122 | let k = W | |
123 | 123 | if ($isInstanceOf(k, "DataTransaction")) | |
124 | 124 | then true | |
125 | 125 | else if ($isInstanceOf(k, "SetScriptTransaction")) | |
126 | 126 | then true | |
127 | 127 | else sigVerify(W.bodyBytes, W.proofs[0], W.senderPublicKey) | |
128 | 128 | } | |
129 | 129 |
github/deemru/w8io/03bedc9 32.22 ms ◑![]()