tx · 74RnyPjtn4D61v7hSpLVC5dZWUYi4ySDNrp2XZvukrsY

3N3AeA5FWm7EHheHoik8BBEA3GXXJosnVY8:  -0.01400000 Waves

2019.11.06 16:22 [753122] smart account 3N3AeA5FWm7EHheHoik8BBEA3GXXJosnVY8 > SELF 0.00000000 Waves

{ "type": 13, "id": "74RnyPjtn4D61v7hSpLVC5dZWUYi4ySDNrp2XZvukrsY", "fee": 1400000, "feeAssetId": null, "timestamp": 1573046594928, "version": 1, "sender": "3N3AeA5FWm7EHheHoik8BBEA3GXXJosnVY8", "senderPublicKey": "87US7E5SdpUB7rbkzLmEUKfYg7uihzCvRzEKy1mCNNjq", "proofs": [ "t25Ttsvzu2Dunj29PEHNrbARW3SiHEa27yfSHwETf1bcHGYzDDWerG1AKKptSG2BN1w485RDZp253g4TFqdB2MH" ], "script": "base64:AAIDAAAAAAAAAAkIARIDCgEBEgAAAAAGAAAAAAdxMXN0YXJ0AAAAAAAAAAC+AAAAAAdxMnN0YXJ0AAAAAAAAAAC+AAAAAAN2aWcAAAAAAAAAADQAAAAAAXMAAAAAAAAAAAoBAAAABGNvZWYAAAACAAAAAXEAAAADZGlmBAAAAARjb2VmCQAAaQAAAAIJAABoAAAAAgUAAAABcQkAAGQAAAACCQAAaAAAAAIJAABoAAAAAgD/////////0QUAAAADZGlmBQAAAANkaWYAAAAAAAAAJxAAAAAAAAAAJxAFAAAABGNvZWYBAAAAC2Fub3RoZXJjb2VmAAAAAgAAAAFxAAAAA2RpZgQAAAAJYWN0dWFsdmlnCQAAaQAAAAIJAABoAAAAAgUAAAADdmlnCQAAZAAAAAIJAABkAAAAAgkAAGgAAAACCQAAaAAAAAIA/////////6EFAAAAA2RpZgUAAAADZGlmCQAAaAAAAAIAAAAAAAAAB1UFAAAAA2RpZgAAAAAAAAAnEAAAAAAAAAAnEAQAAAALYW5vdGhlcmNvZWYJAABsAAAABgkAAGUAAAACCQAAZAAAAAIFAAAACWFjdHVhbHZpZwAAAAAAAAAD6AkAAG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AAAQAAAAIFAAAAByRtYXRjaDACAAAABFVuaXQEAAAAAXUFAAAAByRtYXRjaDAHAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAdCb29sZWFuBAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiCQEAAAAFdGhyb3cAAAAAAwUAAAAGZXZlbnQxCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQAEJQAAAAEIBQAAAApjb250ZXh0T2JqAAAABmNhbGxlcgIAAAANX2V2ZW50MWFtb3VudAAAAAAAAAAAAAUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAApjb250ZXh0T2JqAAAABmNhbGxlcgkAAGgAAAACBQAAAAxldmVudDFhbW91bnQAAAAAAAAPQkAFAAAABHVuaXQFAAAAA25pbAMFAAAABmV2ZW50MgkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkABCUAAAABCAUAAAAKY29udGV4dE9iagAAAAZjYWxsZXICAAAADV9ldmVudDJhbW91bnQAAAAAAAAAAAAFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAAKY29udGV4dE9iagAAAAZjYWxsZXIJAABoAAAAAgUAAAAMZXZlbnQyYW1vdW50AAAAAAAAD0JABQAAAAR1bml0BQAAAANuaWwJAAACAAAAAQIAAAApZXZlbnQgZGlkIG5vdCBoYXBwZW4gb3IgeW91IGhhdmUgemVybyB3aW4AAAAAHogsVQ==", "chainId": 84, "height": 753122, "spentComplexity": 0 } View: original | compacted Prev: 8HL4CgSP89KPbLdKFdcEs74tRgFfMu3j3CquPJVNp1M1 Next: 9zzgP68LDsmhox6T3ZTQfcF7ekF3avsmytvS1az6qoWB Diff:
OldNewDifferences
8080 else e(b, g)
8181 let y = if (((g + 1) >= 0))
8282 then e(a, (g + 1))
83- else h(e(b, (g + 1)), (g + 1))
83+ else h(b, (g + 1))
8484 let z = if (((g - 1) >= 0))
85- then h(e(a, (g - 1)), (g - 1))
85+ then h(a, (g + 1))
8686 else e(b, (g - 1))
8787 let A = (q + 1)
8888 if ((k == 1))
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 = 52
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(e(b, g), g)
7878 let x = if ((g >= 0))
7979 then h(e(a, g), g)
8080 else e(b, g)
8181 let y = if (((g + 1) >= 0))
8282 then e(a, (g + 1))
83- else h(e(b, (g + 1)), (g + 1))
83+ else h(b, (g + 1))
8484 let z = if (((g - 1) >= 0))
85- then h(e(a, (g - 1)), (g - 1))
85+ then h(a, (g + 1))
8686 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 
56.12 ms