tx · 1Z7fQyTeSe4ExUuiJhKefgcymxj9Y7UjwdPyFADSrVH

3N3AeA5FWm7EHheHoik8BBEA3GXXJosnVY8:  -0.01400000 Waves

2019.10.07 14:18 [709296] smart account 3N3AeA5FWm7EHheHoik8BBEA3GXXJosnVY8 > SELF 0.00000000 Waves

{ "type": 13, "id": "1Z7fQyTeSe4ExUuiJhKefgcymxj9Y7UjwdPyFADSrVH", "fee": 1400000, "feeAssetId": null, "timestamp": 1570447131914, "version": 1, "sender": "3N3AeA5FWm7EHheHoik8BBEA3GXXJosnVY8", "senderPublicKey": "87US7E5SdpUB7rbkzLmEUKfYg7uihzCvRzEKy1mCNNjq", "proofs": [ "5ZBr49BtPiwK1xdbwpTNczk4Jhriwru6JXe633zeAC2PeoWUCqSAJgCnDFZhsR9uRuWpCa3YAmRZFG4874HGQZ6d" ], "script": "base64:AAIDAAAAAAAAAAkIARIDCgEBEgAAAAAGAAAAAAdxMXN0YXJ0AAAAAAAAAAC+AAAAAAdxMnN0YXJ0AAAAAAAAAAC+AAAAAAN2aWcAAAAAAAAAAAUAAAAAAXMAAAAAAAAAAAoBAAAABGNvZWYAAAACAAAAAXEAAAADZGlmBAAAAARjb2VmCQAAaQAAAAIJAABoAAAAAgUAAAABcQkAAGQAAAACCQAAaAAAAAIJAABoAAAAAgD/////////0QUAAAADZGlmBQAAAANkaWYAAAAAAAAAJxAAAAAAAAAAJxAFAAAABGNvZWYBAAAAC2Fub3RoZXJjb2VmAAAAAgAAAAFxAAAAA2RpZgQAAAAJYWN0dWFsdmlnCQAAaQAAAAIJAABoAAAAAgUAAAADdmlnCQAAZAAAAAIJAABkAAAAAgkAAGgAAAACCQAAaAAAAAIA/////////6EFAAAAA2RpZgUAAAADZGlmCQAAaAAAAAIAAAAAAAAAB1UFAAAAA2RpZgAAAAAAAAAnEAAAAAAAAAAnEAQAAAALYW5vdGhlcmNvZWYJAABsAAAABgkAAGUAAAACCQAAZAAAAAIFAAAACWFjdHVhbHZpZwAAAAAAA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MAIAAAAHQm9vbGVhbgQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgkBAAAABXRocm93AAAAAAMFAAAABmV2ZW50MQkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkABCUAAAABCAUAAAAKY29udGV4dE9iagAAAAZjYWxsZXICAAAADV9ldmVudDFhbW91bnQAAAAAAAAAAAAFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAAKY29udGV4dE9iagAAAAZjYWxsZXIJAABoAAAAAgUAAAAMZXZlbnQxYW1vdW50AAAAAAAAD0JABQAAAAR1bml0BQAAAANuaWwDBQAAAAZldmVudDIJAQAAAAxTY3JpcHRSZXN1bHQAAAACCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAQlAAAAAQgFAAAACmNvbnRleHRPYmoAAAAGY2FsbGVyAgAAAA1fZXZlbnQyYW1vdW50AAAAAAAAAAAABQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAACmNvbnRleHRPYmoAAAAGY2FsbGVyCQAAaAAAAAIFAAAADGV2ZW50MmFtb3VudAAAAAAAAA9CQAUAAAAEdW5pdAUAAAADbmlsCQAAAgAAAAECAAAAKWV2ZW50IGRpZCBub3QgaGFwcGVuIG9yIHlvdSBoYXZlIHplcm8gd2luAAAAAF1p6LM=", "chainId": 84, "height": 709296, "spentComplexity": 0 } View: original | compacted Prev: 8Xaa2RekedAUsaQj4CmXXNXmAgVUpXwe3LPEW4vxm3ct Next: 43vpTbvQ1CEj642HLsgoe22c4zr8SHpvrTmTPhSugngY Diff:
OldNewDifferences
8282 then e(a, (g + 1))
8383 else h(a, (g + 1))
8484 let z = if (((g - 1) >= 0))
85- then e(b, (g - 1))
86- else h(b, (g - 1))
85+ then h(b, (g - 1))
86+ else e(b, (g - 1))
8787 let A = (q + 1)
8888 if ((k == 1))
8989 then if ((100 > w))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 190
55
66 let b = 190
77
88 let c = 5
99
1010 let d = 10
1111
1212 func e (f,g) = {
1313 let e = ((f * (((-47 * g) * g) + 10000)) / 10000)
1414 e
1515 }
1616
1717
1818 func h (f,g) = {
1919 let i = ((c * ((((-95 * g) * g) + (1877 * g)) + 10000)) / 10000)
2020 let h = pow(((i + 1000) - (100000 / f)), 0, -1, 0, 5, DOWN)
2121 if ((h > 270))
2222 then 270
2323 else h
2424 }
2525
2626
2727 @Callable(j)
2828 func bet (k) = {
2929 let l = {
3030 let m = j.payment
3131 if ($isInstanceOf(m, "AttachedPayment"))
3232 then {
3333 let n = m
3434 if ((100000000 > n.amount))
3535 then throw("low payment")
3636 else n
3737 }
3838 else throw("Payment not attached")
3939 }
4040 let o = getIntegerValue(this, "n")
4141 let p = getIntegerValue(this, "m")
4242 let q = getIntegerValue(this, "count")
4343 let r = (o - p)
4444 let s = {
4545 let m = getInteger(this, (toString(j.caller) + "_event1amount"))
4646 if ($isInstanceOf(m, "Unit"))
4747 then {
4848 let t = m
4949 0
5050 }
5151 else if ($isInstanceOf(m, "Int"))
5252 then {
5353 let u = m
5454 u
5555 }
5656 else throw()
5757 }
5858 let v = {
5959 let m = getInteger(this, (toString(j.caller) + "_event2amount"))
6060 if ($isInstanceOf(m, "Unit"))
6161 then {
6262 let t = m
6363 0
6464 }
6565 else if ($isInstanceOf(m, "Int"))
6666 then {
6767 let u = m
6868 u
6969 }
7070 else throw()
7171 }
7272 let g = if ((k == 1))
7373 then (r + 1)
7474 else (r - 1)
7575 let w = if ((g >= 0))
7676 then e(a, g)
7777 else h(a, g)
7878 let x = if ((g >= 0))
7979 then h(b, g)
8080 else e(b, g)
8181 let y = if (((g + 1) >= 0))
8282 then e(a, (g + 1))
8383 else h(a, (g + 1))
8484 let z = if (((g - 1) >= 0))
85- then e(b, (g - 1))
86- else h(b, (g - 1))
85+ then h(b, (g - 1))
86+ else e(b, (g - 1))
8787 let A = (q + 1)
8888 if ((k == 1))
8989 then if ((100 > w))
9090 then throw(("to low coef q1 = " + toString(w)))
9191 else {
9292 let B = (o + 1)
9393 WriteSet([DataEntry((toString(j.caller) + "_event1amount"), (s + w)), DataEntry((toString(A) + "_event"), k), DataEntry((toString(A) + "_qoef1"), w), DataEntry((toString(A) + "_qoef2"), x), DataEntry((toString(A) + "_bettor"), toString(j.caller)), DataEntry("q1_next", y), DataEntry("q2_next", z), DataEntry("n", B), DataEntry("count", A)])
9494 }
9595 else if ((100 > x))
9696 then throw(("to low coef q2 = " + toString(x)))
9797 else {
9898 let C = (p + 1)
9999 WriteSet([DataEntry((toString(j.caller) + "_event2amount"), (v + x)), DataEntry((toString(A) + "_event"), k), DataEntry((toString(A) + "_qoef2"), x), DataEntry((toString(A) + "_bettor"), toString(j.caller)), DataEntry("q1_next", y), DataEntry("q2_next", z), DataEntry((toString(A) + "_qoef1"), e(a, (o - p))), DataEntry("m", C), DataEntry("count", A)])
100100 }
101101 }
102102
103103
104104
105105 @Callable(j)
106106 func withdraw () = {
107107 let s = {
108108 let m = getInteger(this, (toString(j.caller) + "_event1amount"))
109109 if ($isInstanceOf(m, "Unit"))
110110 then {
111111 let t = m
112112 0
113113 }
114114 else if ($isInstanceOf(m, "Int"))
115115 then {
116116 let u = m
117117 u
118118 }
119119 else throw()
120120 }
121121 let v = {
122122 let m = getInteger(this, (toString(j.caller) + "_event2amount"))
123123 if ($isInstanceOf(m, "Unit"))
124124 then {
125125 let t = m
126126 0
127127 }
128128 else if ($isInstanceOf(m, "Int"))
129129 then {
130130 let u = m
131131 u
132132 }
133133 else throw()
134134 }
135135 let D = {
136136 let m = getBoolean(this, "result_event_1")
137137 if ($isInstanceOf(m, "Unit"))
138138 then {
139139 let t = m
140140 false
141141 }
142142 else if ($isInstanceOf(m, "Boolean"))
143143 then {
144144 let E = m
145145 E
146146 }
147147 else throw()
148148 }
149149 let F = {
150150 let m = getBoolean(this, "result_event_2")
151151 if ($isInstanceOf(m, "Unit"))
152152 then {
153153 let t = m
154154 false
155155 }
156156 else if ($isInstanceOf(m, "Boolean"))
157157 then {
158158 let E = m
159159 E
160160 }
161161 else throw()
162162 }
163163 if (D)
164164 then ScriptResult(WriteSet([DataEntry((toString(j.caller) + "_event1amount"), 0)]), TransferSet([ScriptTransfer(j.caller, (s * 1000000), unit)]))
165165 else if (F)
166166 then ScriptResult(WriteSet([DataEntry((toString(j.caller) + "_event2amount"), 0)]), TransferSet([ScriptTransfer(j.caller, (v * 1000000), unit)]))
167167 else throw("event did not happen or you have zero win")
168168 }
169169
170170

github/deemru/w8io/026f985 
47.05 ms