tx · FZaVVwuudjyPinYPnh2twVyVoL6EezfDWF72xkYXN69a 3MsGBnTzBhrNe6w1KpLYPkzdDdxWudm4U89: -0.01400000 Waves 2019.08.21 09:43 [640535] smart account 3MsGBnTzBhrNe6w1KpLYPkzdDdxWudm4U89 > SELF 0.00000000 Waves
{ "type": 13, "id": "FZaVVwuudjyPinYPnh2twVyVoL6EezfDWF72xkYXN69a", "fee": 1400000, "feeAssetId": null, "timestamp": 1566369779177, "version": 1, "sender": "3MsGBnTzBhrNe6w1KpLYPkzdDdxWudm4U89", "senderPublicKey": "FgbqvGasMMrXxbhwrsgEiCgJLjXPjgn8kHxsZiVmLrkb", "proofs": [ "46MnVQEFEfwPwwN4SnzZ65viTxy2NRVJFdjvmVgUoCZWNP7iTnAVhJCVfMuPcQv1jk9baTcxwVgSi1UrMLhY4V2o" ], "script": "base64:AAIDAAAAAAAAAAAAAAAgAAAAAAlSU0FQVUJMSUMJAAJbAAAAAQIAAAGPYmFzZTY0Ok1JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQkNnS0NBUUVBbGVtcjk1SjFqWlVzN2NKbXJtbWxONHpvN1lWc0JKekllSmRrOExERkdoVUtTSTZ5ZnMyMFp5SmUyMSs2R0p3Tm5LVVUxVXlvYzE3d1NXTUtrclowTU12WUUrWjVBaWlqdkJLNHNTSjNJZ0dqZFU4L05oSThDQkR1MEYreFJNOXEzVEIzTExiRHk1c0JkdWRZZkhmc1VPYytNVHZBRDY5bjI3ZGIyUmg4K3laUU10dWJrdVRRTnA4OXNwaEhRYUxHeVFGYU5sSy9OYTNsRng2b21xemFhMWdqb3BsVXI2cnZZS2dmQUlDVUIzelZtSlNoaUVpN3c3UjBoV2xOUkQzcWNaakNVT05TcEZvNFdiemtuR09henc4NEIrSU1JRm5JcFhXelFMOFJYMHZOY2ZzQnZMRGZNNmsyWmFjcXd5TUthTExxaWdkQmlHZEo3VyswbE9TdE9RSURBUUFCAAAAABNSQU5ET1JBQ0xFVEl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WlnaHQFAAAABndpbkFtdAIAAAAABAAAAAZTRVJWRVIJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQQAAAAOc2VydmVyVHJhbnNmZXIJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAAGU0VSVkVSBQAAAApDT01NSVNTSU9OBQAAAAR1bml0BQAAAANuaWwEAAAAB2JldERhdGEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAADlJFU0VSVkFUSU9OS0VZCQEAAAAeVmFsaWRhdGVBbmRJbmNyZWFzZVJlc2VydmVkQW10AAAAAQUAAAAGd2luQW10CQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAA9HQU1FU0NPVU5URVJLRVkFAAAACm5ld0dhbWVOdW0JAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAABmdhbWVJZAUAAAALZ2FtZURhdGFTdHIFAAAAA25pbAkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEFAAAAB2JldERhdGEJAQAAAAtUcmFuc2ZlclNldAAAAAEFAAAADnNlcnZlclRyYW5zZmVyAAAAAGr4Mxw=", "chainId": 84, "height": 640535, "spentComplexity": 0 } View: original | compacted Prev: SdbTsCAiPk8fsrHpmZBw4vnWT7PuWxbpYu8kK1Ysxim Next: 9fSDAxX9uypZWBcdkeJiMqx9H49oNpTh6qKtpk91ZN3F Diff:
Old | New | Differences | |
---|---|---|---|
7 | 7 | ||
8 | 8 | let c = ((100 * 1000) * 1000) | |
9 | 9 | ||
10 | - | let d = (( | |
10 | + | let d = ((9 * c) / 1000) | |
11 | 11 | ||
12 | 12 | let e = (1 * c) | |
13 | 13 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = fromBase64String("base64:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlemr95J1jZUs7cJmrmmlN4zo7YVsBJzIeJdk8LDFGhUKSI6yfs20ZyJe21+6GJwNnKUU1Uyoc17wSWMKkrZ0MMvYE+Z5AiijvBK4sSJ3IgGjdU8/NhI8CBDu0F+xRM9q3TB3LLbDy5sBdudYfHfsUOc+MTvAD69n27db2Rh8+yZQMtubkuTQNp89sphHQaLGyQFaNlK/Na3lFx6omqzaa1gjoplUr6rvYKgfAICUB3zVmJShiEi7w7R0hWlNRD3qcZjCUONSpFo4WbzknGOazw84B+IMIFnIpXWzQL8RX0vNcfsBvLDfM6k2ZacqwyMKaLLqigdBiGdJ7W+0lOStOQIDAQAB") | |
5 | 5 | ||
6 | 6 | let b = 4320 | |
7 | 7 | ||
8 | 8 | let c = ((100 * 1000) * 1000) | |
9 | 9 | ||
10 | - | let d = (( | |
10 | + | let d = ((9 * c) / 1000) | |
11 | 11 | ||
12 | 12 | let e = (1 * c) | |
13 | 13 | ||
14 | 14 | let f = (2 * c) | |
15 | 15 | ||
16 | 16 | let g = (4 * c) | |
17 | 17 | ||
18 | 18 | let h = (8 * c) | |
19 | 19 | ||
20 | 20 | let i = (14 * c) | |
21 | 21 | ||
22 | 22 | let j = 10000 | |
23 | 23 | ||
24 | 24 | let k = 39655 | |
25 | 25 | ||
26 | 26 | let l = 24600 | |
27 | 27 | ||
28 | 28 | let m = 19000 | |
29 | 29 | ||
30 | 30 | let n = 14200 | |
31 | 31 | ||
32 | 32 | let o = 11400 | |
33 | 33 | ||
34 | 34 | let p = "$GAME_NUM" | |
35 | 35 | ||
36 | 36 | let q = "$RESERVED_AMOUNT" | |
37 | 37 | ||
38 | 38 | let r = "SUBMITTED" | |
39 | 39 | ||
40 | 40 | let s = "WON" | |
41 | 41 | ||
42 | 42 | let t = "LOST" | |
43 | 43 | ||
44 | 44 | func u (v) = i | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | func w (x,y) = { | |
48 | 48 | let z = rsaVerify(SHA256, toBytes(x), y, a) | |
49 | 49 | if (z) | |
50 | 50 | then { | |
51 | 51 | let A = (toInt(sha256(y)) % 6) | |
52 | 52 | if ((0 > A)) | |
53 | 53 | then (-1 * A) | |
54 | 54 | else A | |
55 | 55 | } | |
56 | 56 | else throw("Invalid RSA signature") | |
57 | 57 | } | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func B (C) = if ((size(C) > 0)) | |
61 | 61 | then drop(C, 1) | |
62 | 62 | else C | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func D (C) = { | |
66 | 66 | let E = size(C) | |
67 | 67 | if ((E > 0)) | |
68 | 68 | then { | |
69 | 69 | let F = parseIntValue(take(C, 2)) | |
70 | 70 | let G = take(drop(C, 2), F) | |
71 | 71 | let H = drop(C, (F + 2)) | |
72 | 72 | let I = B(H) | |
73 | 73 | [G, I] | |
74 | 74 | } | |
75 | 75 | else throw("Empty string was passed into parseNextAttribute func") | |
76 | 76 | } | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func J (K) = { | |
80 | 80 | let L = D(K) | |
81 | 81 | let v = D(L[1]) | |
82 | 82 | let M = D(v[1]) | |
83 | 83 | let N = D(M[1]) | |
84 | 84 | let O = D(N[1]) | |
85 | 85 | [L[0], v[0], M[0], N[0], O[0]] | |
86 | 86 | } | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func P (x) = { | |
90 | 90 | let Q = { | |
91 | 91 | let R = getString(this, x) | |
92 | 92 | if ($isInstanceOf(R, "String")) | |
93 | 93 | then { | |
94 | 94 | let S = R | |
95 | 95 | S | |
96 | 96 | } | |
97 | 97 | else throw(("Couldn't find game by " + x)) | |
98 | 98 | } | |
99 | 99 | J(Q) | |
100 | 100 | } | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func T () = { | |
104 | 104 | let R = getInteger(this, q) | |
105 | 105 | if ($isInstanceOf(R, "Int")) | |
106 | 106 | then { | |
107 | 107 | let U = R | |
108 | 108 | U | |
109 | 109 | } | |
110 | 110 | else 0 | |
111 | 111 | } | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func V (O) = { | |
115 | 115 | let W = (T() + O) | |
116 | 116 | let X = wavesBalance(this) | |
117 | 117 | if ((W > X)) | |
118 | 118 | then throw("Insufficient funds on Russian Roulette account. Transaction was rejected for your safety.") | |
119 | 119 | else W | |
120 | 120 | } | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func Y () = { | |
124 | 124 | let Z = { | |
125 | 125 | let R = getInteger(this, p) | |
126 | 126 | if ($isInstanceOf(R, "Int")) | |
127 | 127 | then { | |
128 | 128 | let aa = R | |
129 | 129 | aa | |
130 | 130 | } | |
131 | 131 | else 0 | |
132 | 132 | } | |
133 | 133 | (Z + 1) | |
134 | 134 | } | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func ab (ac) = { | |
138 | 138 | let E = size(ac) | |
139 | 139 | if ((E == 0)) | |
140 | 140 | then throw("Parameter size must be greater then 0") | |
141 | 141 | else if ((E > 99)) | |
142 | 142 | then throw("Parameter size must be less then 100") | |
143 | 143 | else if ((10 > E)) | |
144 | 144 | then (("0" + toString(E)) + ac) | |
145 | 145 | else (toString(E) + ac) | |
146 | 146 | } | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | func ad (L,v,M,N,O,ae) = { | |
150 | 150 | let af = ((((((((ab(L) + "_") + ab(v)) + "_") + ab(M)) + "_") + ab(toString(N))) + "_") + ab(toString(O))) | |
151 | 151 | if ((ae == "")) | |
152 | 152 | then af | |
153 | 153 | else ((af + "_") + ab(ae)) | |
154 | 154 | } | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | func ag (ah,v) = { | |
158 | 158 | let ai = if (if (if (if (if ((ah == (e + d))) | |
159 | 159 | then true | |
160 | 160 | else (ah == (f + d))) | |
161 | 161 | then true | |
162 | 162 | else (ah == (g + d))) | |
163 | 163 | then true | |
164 | 164 | else (ah == (h + d))) | |
165 | 165 | then true | |
166 | 166 | else (ah == (i + d))) | |
167 | 167 | then true | |
168 | 168 | else false | |
169 | 169 | if (ai) | |
170 | 170 | then { | |
171 | 171 | let aj = size(v) | |
172 | 172 | let ak = (ah - d) | |
173 | 173 | if ((aj == 5)) | |
174 | 174 | then ((ak * k) / j) | |
175 | 175 | else if ((aj == 4)) | |
176 | 176 | then ((ak * l) / j) | |
177 | 177 | else if ((aj == 3)) | |
178 | 178 | then ((ak * m) / j) | |
179 | 179 | else if ((aj == 2)) | |
180 | 180 | then ((ak * n) / j) | |
181 | 181 | else if ((aj == 1)) | |
182 | 182 | then ((ak * o) / j) | |
183 | 183 | else throw("Invalid bullets in player's choice") | |
184 | 184 | } | |
185 | 185 | else throw("Bet amount is not in range") | |
186 | 186 | } | |
187 | 187 | ||
188 | 188 | ||
189 | 189 | @Callable(al) | |
190 | 190 | func bet (v) = { | |
191 | 191 | let am = Y() | |
192 | 192 | let x = toBase58String(al.transactionId) | |
193 | 193 | let an = extract(al.payment) | |
194 | 194 | let ao = isDefined(an.assetId) | |
195 | 195 | let ap = isDefined(an.assetId) | |
196 | 196 | let O = ag(an.amount, v) | |
197 | 197 | let aq = isDefined(getString(this, x)) | |
198 | 198 | if (ao) | |
199 | 199 | then throw("Bet amount must be in Waves") | |
200 | 200 | else if (ap) | |
201 | 201 | then throw("Transaction's fee must be in Waves") | |
202 | 202 | else if (aq) | |
203 | 203 | then throw("Passed txId had been used before. Game aborted.") | |
204 | 204 | else { | |
205 | 205 | let M = toBase58String(al.callerPublicKey) | |
206 | 206 | let ar = ad(r, v, M, height, O, "") | |
207 | 207 | let as = addressFromPublicKey(al.callerPublicKey) | |
208 | 208 | let at = [ScriptTransfer(as, d, unit)] | |
209 | 209 | let au = [DataEntry(q, V(O)), DataEntry(p, am), DataEntry(x, ar)] | |
210 | 210 | ScriptResult(WriteSet(au), TransferSet(at)) | |
211 | 211 | } | |
212 | 212 | } | |
213 | 213 | ||
214 | 214 |
github/deemru/w8io/026f985 41.83 ms ◑