tx · FxXS7swn7hHGXCxxwsN68RkVrPWbycui6b3wKaNd69As 3Mt71RiSbWYENDmeyndvwjoJZwUsXfUkR6b: -0.01400000 Waves 2021.02.08 16:25 [1389281] smart account 3Mt71RiSbWYENDmeyndvwjoJZwUsXfUkR6b > SELF 0.00000000 Waves
{ "type": 13, "id": "FxXS7swn7hHGXCxxwsN68RkVrPWbycui6b3wKaNd69As", "fee": 1400000, "feeAssetId": null, "timestamp": 1612790764024, "version": 2, "chainId": 84, "sender": "3Mt71RiSbWYENDmeyndvwjoJZwUsXfUkR6b", "senderPublicKey": "3BKFQLeo5ExZ5Y1pt9Ftzsno7aRwzD96zoYVHP3tcLgV", "proofs": [ "dAcWUiM9NBMQ2tAcUaYRNv5sNDqN3s2bQ9snnfio2as2btcmDRKG6urjV5HL85Npd4udaQEMjKFZt14GxYwX2S9" ], "script": "base64:AAIDAAAAAAAAAAwIARIGCgQBAQEBEgAAAAAOAAAAAA1sb3R0ZXJ5YW1vdW50AgAAAAdfYW1vdW50AAAAABJsb3R0ZXJ5cHJvYmFiaWxpdHkCAAAADF9wcm9iYWJpbGl0eQAAAAAZbG90dGVyeXByb2JhYmlsaXR5ZGVjaW1hbAIAAAAVX3Byb2JhYmlsaXR5X2RlY2ltYWxfAAAAAAxsb3R0ZXJ5UHJpY2UCAAAABl9wcmljZQAAAAANbG90dGVyeVByaWNlcwIAAAAQX2xvdHRlcnlfcHJpY2VzXwAAAAANY291bnRPZlByaWNlcwIAAAANX2NvdW50X3ByaWNlcwAAAAAUbGFzdEhhc2hSYW5kb21OdW1iZXICAAAAFWxhc3Rfc3Bpbl9yYW5kb21faGFzaAAAAAATbGFzdFRva2VuUmFuZG9tSGFzaAIAAAAXX2xhc3RfdG9rZW5fcmFuZG9tX2hhc2gBAAAACnJhbmRvbWl6ZXIAAAABAAAAA2ludgQAAAAIbGFzdFBsYXkEAAAAByRtYXRjaDAJAAQcAAAAAgUAAAAEdGhpcwUAAAAUbGFzdEhhc2hSYW5kb21Od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N0NDUwNDQ1NDAAAAAAAAAAAAUJAAACAAAAAQIAAAASTGlzdCBzaXplIGV4Y2VlZCA1BAAAAAl3cml0ZVNldHMJAQAAAAhXcml0ZVNldAAAAAEFAAAAA25pbAkBAAAADFNjcmlwdFJlc3VsdAAAAAIFAAAACXdyaXRlU2V0cwkBAAAAC1RyYW5zZmVyU2V0AAAAAQUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXlR3hoH", "height": 1389281, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CYg4AvbhYq7CNsnSDSYoNb79tmMriZUQ65Vm6fFgkw4r Next: 8oP1j2zeVYEdKUyGUue27LBVD4jwGSqZqH5uhAm7GV59 Diff:
Old | New | Differences | |
---|---|---|---|
132 | 132 | let X = 1000 | |
133 | 133 | let Y = (toInt(U) % (1 * 1000)) | |
134 | 134 | let Z = ["priceList", "fsdfd"] | |
135 | + | let r = getStringValue(this, e) | |
136 | + | let s = take(r, (size(r) - 1)) | |
137 | + | let t = split(s, ",") | |
138 | + | let u = size(t) | |
135 | 139 | let aa = { | |
136 | 140 | let ab = W | |
137 | 141 | let ac = size(ab) | |
144 | 148 | then ae | |
145 | 149 | else { | |
146 | 150 | let af = C(ae, ab[1]) | |
147 | - | throw("List size exceed 1") | |
151 | + | if ((ac == 2)) | |
152 | + | then af | |
153 | + | else { | |
154 | + | let ag = C(af, ab[2]) | |
155 | + | if ((ac == 3)) | |
156 | + | then ag | |
157 | + | else { | |
158 | + | let ah = C(ag, ab[3]) | |
159 | + | if ((ac == 4)) | |
160 | + | then ah | |
161 | + | else { | |
162 | + | let ai = C(ah, ab[4]) | |
163 | + | if ((ac == 5)) | |
164 | + | then ai | |
165 | + | else { | |
166 | + | let aj = C(ai, ab[5]) | |
167 | + | throw("List size exceed 5") | |
168 | + | } | |
169 | + | } | |
170 | + | } | |
171 | + | } | |
148 | 172 | } | |
149 | 173 | } | |
150 | 174 | } | |
151 | - | let | |
152 | - | ScriptResult( | |
175 | + | let ak = WriteSet(nil) | |
176 | + | ScriptResult(ak, TransferSet(nil)) | |
153 | 177 | } | |
154 | 178 | ||
155 | 179 | ||
156 | - | @Verifier( | |
157 | - | func | |
158 | - | let l = | |
180 | + | @Verifier(al) | |
181 | + | func am () = { | |
182 | + | let l = al | |
159 | 183 | if ($isInstanceOf(l, "DataTransaction")) | |
160 | 184 | then true | |
161 | 185 | else if ($isInstanceOf(l, "SetScriptTransaction")) | |
162 | 186 | then true | |
163 | - | else sigVerify( | |
187 | + | else sigVerify(al.bodyBytes, al.proofs[0], al.senderPublicKey) | |
164 | 188 | } | |
165 | 189 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "_amount" | |
5 | 5 | ||
6 | 6 | let b = "_probability" | |
7 | 7 | ||
8 | 8 | let c = "_probability_decimal_" | |
9 | 9 | ||
10 | 10 | let d = "_price" | |
11 | 11 | ||
12 | 12 | let e = "_lottery_prices_" | |
13 | 13 | ||
14 | 14 | let f = "_count_prices" | |
15 | 15 | ||
16 | 16 | let g = "last_spin_random_hash" | |
17 | 17 | ||
18 | 18 | let h = "_last_token_random_hash" | |
19 | 19 | ||
20 | 20 | func i (j) = { | |
21 | 21 | let k = { | |
22 | 22 | let l = getBinary(this, g) | |
23 | 23 | if ($isInstanceOf(l, "ByteVector")) | |
24 | 24 | then { | |
25 | 25 | let m = l | |
26 | 26 | m | |
27 | 27 | } | |
28 | 28 | else if ($isInstanceOf(l, "Unit")) | |
29 | 29 | then base58'2ee4oFDYriWJ9EMeR' | |
30 | 30 | else throw("Match error") | |
31 | 31 | } | |
32 | 32 | let n = (((((k + j.transactionId) + j.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height)) | |
33 | 33 | sha256(n) | |
34 | 34 | } | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func o (j) = { | |
38 | 38 | let p = { | |
39 | 39 | let l = getBinary(this, h) | |
40 | 40 | if ($isInstanceOf(l, "ByteVector")) | |
41 | 41 | then { | |
42 | 42 | let m = l | |
43 | 43 | m | |
44 | 44 | } | |
45 | 45 | else if ($isInstanceOf(l, "Unit")) | |
46 | 46 | then base58'4dD7osCQzvuXJdTiGfKvTwnKT' | |
47 | 47 | else throw("Match error") | |
48 | 48 | } | |
49 | 49 | let n = (((((p + j.transactionId) + j.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height)) | |
50 | 50 | sha256(n) | |
51 | 51 | } | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func q () = { | |
55 | 55 | let r = getStringValue(this, e) | |
56 | 56 | let s = take(r, (size(r) - 1)) | |
57 | 57 | let t = split(s, ",") | |
58 | 58 | let u = size(t) | |
59 | 59 | u | |
60 | 60 | } | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func v () = { | |
64 | 64 | let r = getStringValue(this, e) | |
65 | 65 | let s = take(r, (size(r) - 1)) | |
66 | 66 | let w = split(s, ",") | |
67 | 67 | w | |
68 | 68 | } | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func x (y,z) = { | |
72 | 72 | let A = getIntegerValue(this, (y + a)) | |
73 | 73 | if ((A == 0)) | |
74 | 74 | then throw("Amount exceeded") | |
75 | 75 | else if ((z == true)) | |
76 | 76 | then if ((A == -1)) | |
77 | 77 | then A | |
78 | 78 | else { | |
79 | 79 | let B = (A - 1) | |
80 | 80 | B | |
81 | 81 | } | |
82 | 82 | else A | |
83 | 83 | } | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func C (D,E) = (D + 1) | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | @Callable(F) | |
90 | 90 | func updateprobability (G,H,I,J) = { | |
91 | 91 | let y = toBase64String(o(F)) | |
92 | 92 | let K = extract(F.payment) | |
93 | 93 | let L = (H * I) | |
94 | 94 | if ((L > K.amount)) | |
95 | 95 | then throw("Payment is not equal price") | |
96 | 96 | else { | |
97 | 97 | let M = { | |
98 | 98 | let l = getString(this, e) | |
99 | 99 | if ($isInstanceOf(l, "String")) | |
100 | 100 | then { | |
101 | 101 | let N = l | |
102 | 102 | N | |
103 | 103 | } | |
104 | 104 | else "" | |
105 | 105 | } | |
106 | 106 | let O = indexOf(M, y) | |
107 | 107 | let P = { | |
108 | 108 | let l = O | |
109 | 109 | if ($isInstanceOf(l, "Unit")) | |
110 | 110 | then ((M + y) + ",") | |
111 | 111 | else if ($isInstanceOf(l, "Int")) | |
112 | 112 | then { | |
113 | 113 | let Q = l | |
114 | 114 | throw("Token is duplicated") | |
115 | 115 | } | |
116 | 116 | else throw("Match error") | |
117 | 117 | } | |
118 | 118 | let R = q() | |
119 | 119 | let S = WriteSet([DataEntry((y + a), H), DataEntry((y + b), G), DataEntry((y + d), I), DataEntry((y + e), P), DataEntry((y + f), R), DataEntry((y + c), J), DataEntry((y + h), y)]) | |
120 | 120 | ScriptResult(S, TransferSet(nil)) | |
121 | 121 | } | |
122 | 122 | } | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | ||
126 | 126 | @Callable(F) | |
127 | 127 | func startlotto () = { | |
128 | 128 | let T = toBase58String(F.caller.bytes) | |
129 | 129 | let U = i(F) | |
130 | 130 | let V = q() | |
131 | 131 | let W = v() | |
132 | 132 | let X = 1000 | |
133 | 133 | let Y = (toInt(U) % (1 * 1000)) | |
134 | 134 | let Z = ["priceList", "fsdfd"] | |
135 | + | let r = getStringValue(this, e) | |
136 | + | let s = take(r, (size(r) - 1)) | |
137 | + | let t = split(s, ",") | |
138 | + | let u = size(t) | |
135 | 139 | let aa = { | |
136 | 140 | let ab = W | |
137 | 141 | let ac = size(ab) | |
138 | 142 | let ad = 0 | |
139 | 143 | if ((ac == 0)) | |
140 | 144 | then ad | |
141 | 145 | else { | |
142 | 146 | let ae = C(ad, ab[0]) | |
143 | 147 | if ((ac == 1)) | |
144 | 148 | then ae | |
145 | 149 | else { | |
146 | 150 | let af = C(ae, ab[1]) | |
147 | - | throw("List size exceed 1") | |
151 | + | if ((ac == 2)) | |
152 | + | then af | |
153 | + | else { | |
154 | + | let ag = C(af, ab[2]) | |
155 | + | if ((ac == 3)) | |
156 | + | then ag | |
157 | + | else { | |
158 | + | let ah = C(ag, ab[3]) | |
159 | + | if ((ac == 4)) | |
160 | + | then ah | |
161 | + | else { | |
162 | + | let ai = C(ah, ab[4]) | |
163 | + | if ((ac == 5)) | |
164 | + | then ai | |
165 | + | else { | |
166 | + | let aj = C(ai, ab[5]) | |
167 | + | throw("List size exceed 5") | |
168 | + | } | |
169 | + | } | |
170 | + | } | |
171 | + | } | |
148 | 172 | } | |
149 | 173 | } | |
150 | 174 | } | |
151 | - | let | |
152 | - | ScriptResult( | |
175 | + | let ak = WriteSet(nil) | |
176 | + | ScriptResult(ak, TransferSet(nil)) | |
153 | 177 | } | |
154 | 178 | ||
155 | 179 | ||
156 | - | @Verifier( | |
157 | - | func | |
158 | - | let l = | |
180 | + | @Verifier(al) | |
181 | + | func am () = { | |
182 | + | let l = al | |
159 | 183 | if ($isInstanceOf(l, "DataTransaction")) | |
160 | 184 | then true | |
161 | 185 | else if ($isInstanceOf(l, "SetScriptTransaction")) | |
162 | 186 | then true | |
163 | - | else sigVerify( | |
187 | + | else sigVerify(al.bodyBytes, al.proofs[0], al.senderPublicKey) | |
164 | 188 | } | |
165 | 189 |
github/deemru/w8io/03bedc9 31.14 ms ◑![]()