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:AAIDAAAAAAAAAAAAAAAgAAAAAAlSU0FQVUJMSUMJAAJbAAAAAQIAAAGPYmFzZTY0Ok1JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQkNnS0NBUUVBbGVtcjk1SjFqWlVzN2NKbXJtbWxONHpvN1lWc0JKekllSmRrOExERkdoVUtTSTZ5ZnMyMFp5SmUyMSs2R0p3Tm5LVVUxVXlvYzE3d1NXTUtrclowTU12WUUrWjVBaWlqdkJLNHNTSjNJZ0dqZFU4L05oSThDQkR1MEYreFJNOXEzVEIzTExiRHk1c0JkdWRZZkhmc1VPYytNVHZBRDY5bjI3ZGIyUmg4K3laUU10dWJrdVRRTnA4OXNwaEhRYUxHeVFGYU5sSy9OYTNsRng2b21xemFhMWdqb3BsVXI2cnZZS2dmQUlDVUIzelZtSlNoaUVpN3c3UjBoV2xOUkQzcWNaakNVT05TcEZvNFdiemtuR09henc4NEIrSU1JRm5JcFhXelFMOFJYMHZOY2ZzQnZMRGZNNmsyWmFjcXd5TUthTExxaWdkQmlHZEo3VyswbE9TdE9RSURBUUFCAAAAABNSQU5ET1JBQ0xFV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ZWlnaHQFAAAABndpbkFtdAIAAAAABAAAAAZTRVJWRVIJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQQAAAAOc2VydmVyVHJhbnNmZXIJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAAGU0VSVkVSBQAAAApDT01NSVNTSU9OBQAAAAR1bml0BQAAAANuaWwEAAAAB2JldERhdGEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAADlJFU0VSVkFUSU9OS0VZCQEAAAAeVmFsaWRhdGVBbmRJbmNyZWFzZVJlc2VydmVkQW10AAAAAQUAAAAGd2luQW10CQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAA9HQU1FU0NPVU5URVJLRVkFAAAACm5ld0dhbWVOdW0JAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAABmdhbWVJZAUAAAALZ2FtZURhdGFTdHIFAAAAA25pbAkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEFAAAAB2JldERhdGEJAQAAAAtUcmFuc2ZlclNldAAAAAEFAAAADnNlcnZlclRyYW5zZmVyAAAAAGr4Mxw=", "chainId": 84, "height": 640535, "spentComplexity": 0 } View: original | compacted Prev: SdbTsCAiPk8fsrHpmZBw4vnWT7PuWxbpYu8kK1Ysxim Next: 9fSDAxX9uypZWBcdkeJiMqx9H49oNpTh6qKtpk91ZN3F Diff:
OldNewDifferences
77
88 let c = ((100 * 1000) * 1000)
99
10-let d = ((5 * c) / 1000)
10+let d = ((9 * c) / 1000)
1111
1212 let e = (1 * c)
1313
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = fromBase64String("base64:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlemr95J1jZUs7cJmrmmlN4zo7YVsBJzIeJdk8LDFGhUKSI6yfs20ZyJe21+6GJwNnKUU1Uyoc17wSWMKkrZ0MMvYE+Z5AiijvBK4sSJ3IgGjdU8/NhI8CBDu0F+xRM9q3TB3LLbDy5sBdudYfHfsUOc+MTvAD69n27db2Rh8+yZQMtubkuTQNp89sphHQaLGyQFaNlK/Na3lFx6omqzaa1gjoplUr6rvYKgfAICUB3zVmJShiEi7w7R0hWlNRD3qcZjCUONSpFo4WbzknGOazw84B+IMIFnIpXWzQL8RX0vNcfsBvLDfM6k2ZacqwyMKaLLqigdBiGdJ7W+0lOStOQIDAQAB")
55
66 let b = 4320
77
88 let c = ((100 * 1000) * 1000)
99
10-let d = ((5 * c) / 1000)
10+let d = ((9 * c) / 1000)
1111
1212 let e = (1 * c)
1313
1414 let f = (2 * c)
1515
1616 let g = (4 * c)
1717
1818 let h = (8 * c)
1919
2020 let i = (14 * c)
2121
2222 let j = 10000
2323
2424 let k = 39655
2525
2626 let l = 24600
2727
2828 let m = 19000
2929
3030 let n = 14200
3131
3232 let o = 11400
3333
3434 let p = "$GAME_NUM"
3535
3636 let q = "$RESERVED_AMOUNT"
3737
3838 let r = "SUBMITTED"
3939
4040 let s = "WON"
4141
4242 let t = "LOST"
4343
4444 func u (v) = i
4545
4646
4747 func w (x,y) = {
4848 let z = rsaVerify(SHA256, toBytes(x), y, a)
4949 if (z)
5050 then {
5151 let A = (toInt(sha256(y)) % 6)
5252 if ((0 > A))
5353 then (-1 * A)
5454 else A
5555 }
5656 else throw("Invalid RSA signature")
5757 }
5858
5959
6060 func B (C) = if ((size(C) > 0))
6161 then drop(C, 1)
6262 else C
6363
6464
6565 func D (C) = {
6666 let E = size(C)
6767 if ((E > 0))
6868 then {
6969 let F = parseIntValue(take(C, 2))
7070 let G = take(drop(C, 2), F)
7171 let H = drop(C, (F + 2))
7272 let I = B(H)
7373 [G, I]
7474 }
7575 else throw("Empty string was passed into parseNextAttribute func")
7676 }
7777
7878
7979 func J (K) = {
8080 let L = D(K)
8181 let v = D(L[1])
8282 let M = D(v[1])
8383 let N = D(M[1])
8484 let O = D(N[1])
8585 [L[0], v[0], M[0], N[0], O[0]]
8686 }
8787
8888
8989 func P (x) = {
9090 let Q = {
9191 let R = getString(this, x)
9292 if ($isInstanceOf(R, "String"))
9393 then {
9494 let S = R
9595 S
9696 }
9797 else throw(("Couldn't find game by " + x))
9898 }
9999 J(Q)
100100 }
101101
102102
103103 func T () = {
104104 let R = getInteger(this, q)
105105 if ($isInstanceOf(R, "Int"))
106106 then {
107107 let U = R
108108 U
109109 }
110110 else 0
111111 }
112112
113113
114114 func V (O) = {
115115 let W = (T() + O)
116116 let X = wavesBalance(this)
117117 if ((W > X))
118118 then throw("Insufficient funds on Russian Roulette account. Transaction was rejected for your safety.")
119119 else W
120120 }
121121
122122
123123 func Y () = {
124124 let Z = {
125125 let R = getInteger(this, p)
126126 if ($isInstanceOf(R, "Int"))
127127 then {
128128 let aa = R
129129 aa
130130 }
131131 else 0
132132 }
133133 (Z + 1)
134134 }
135135
136136
137137 func ab (ac) = {
138138 let E = size(ac)
139139 if ((E == 0))
140140 then throw("Parameter size must be greater then 0")
141141 else if ((E > 99))
142142 then throw("Parameter size must be less then 100")
143143 else if ((10 > E))
144144 then (("0" + toString(E)) + ac)
145145 else (toString(E) + ac)
146146 }
147147
148148
149149 func ad (L,v,M,N,O,ae) = {
150150 let af = ((((((((ab(L) + "_") + ab(v)) + "_") + ab(M)) + "_") + ab(toString(N))) + "_") + ab(toString(O)))
151151 if ((ae == ""))
152152 then af
153153 else ((af + "_") + ab(ae))
154154 }
155155
156156
157157 func ag (ah,v) = {
158158 let ai = if (if (if (if (if ((ah == (e + d)))
159159 then true
160160 else (ah == (f + d)))
161161 then true
162162 else (ah == (g + d)))
163163 then true
164164 else (ah == (h + d)))
165165 then true
166166 else (ah == (i + d)))
167167 then true
168168 else false
169169 if (ai)
170170 then {
171171 let aj = size(v)
172172 let ak = (ah - d)
173173 if ((aj == 5))
174174 then ((ak * k) / j)
175175 else if ((aj == 4))
176176 then ((ak * l) / j)
177177 else if ((aj == 3))
178178 then ((ak * m) / j)
179179 else if ((aj == 2))
180180 then ((ak * n) / j)
181181 else if ((aj == 1))
182182 then ((ak * o) / j)
183183 else throw("Invalid bullets in player's choice")
184184 }
185185 else throw("Bet amount is not in range")
186186 }
187187
188188
189189 @Callable(al)
190190 func bet (v) = {
191191 let am = Y()
192192 let x = toBase58String(al.transactionId)
193193 let an = extract(al.payment)
194194 let ao = isDefined(an.assetId)
195195 let ap = isDefined(an.assetId)
196196 let O = ag(an.amount, v)
197197 let aq = isDefined(getString(this, x))
198198 if (ao)
199199 then throw("Bet amount must be in Waves")
200200 else if (ap)
201201 then throw("Transaction's fee must be in Waves")
202202 else if (aq)
203203 then throw("Passed txId had been used before. Game aborted.")
204204 else {
205205 let M = toBase58String(al.callerPublicKey)
206206 let ar = ad(r, v, M, height, O, "")
207207 let as = addressFromPublicKey(al.callerPublicKey)
208208 let at = [ScriptTransfer(as, d, unit)]
209209 let au = [DataEntry(q, V(O)), DataEntry(p, am), DataEntry(x, ar)]
210210 ScriptResult(WriteSet(au), TransferSet(at))
211211 }
212212 }
213213
214214

github/deemru/w8io/026f985 
41.83 ms