tx · DBt6aQVBVzqazoob4VYJCS3GUVG6RNpv5CFFkpdTkTXa

3MyPxvC5pvRWe8KtXn35Vjcw8b1DLLXpDxu:  -0.01400000 Waves

2019.09.20 16:13 [684684] smart account 3MyPxvC5pvRWe8KtXn35Vjcw8b1DLLXpDxu > SELF 0.00000000 Waves

{ "type": 13, "id": "DBt6aQVBVzqazoob4VYJCS3GUVG6RNpv5CFFkpdTkTXa", "fee": 1400000, "feeAssetId": null, "timestamp": 1568985210604, "version": 1, "sender": "3MyPxvC5pvRWe8KtXn35Vjcw8b1DLLXpDxu", "senderPublicKey": "58gE6BwC4kdEuM8Q5jAP95JTzWwtCqAm352WZe4bHcDE", "proofs": [ "3gEYD7SUDZdtJ6pMyenSjiq6zYGMEzpf5F3Dod2uUU6K8GhygWMCTinsJ25UJrffz3j4CwV5oneCu1bVaHQua9KG" ], "script": "base64:AAIDAAAAAAAAAAAAAAAFAAAAAAdxMXN0YXJ0AAAAAAAAAAC+AAAAAAdxMnN0YXJ0AAAAAAAAAAC+AAAAAAFzAAAAAAAAAAAKAQAAAARjb2VmAAAAAgAAAAFxAAAAA2RpZgQAAAAGcmVzdWx0CQAAaQAAAAIJAABoAAAAAgUAAAABcQkAAGQAAAACCQAAaAAAAAIJAABoAAAAAgD/////////0QUAAAADZGlmBQAAAANkaWYAAAAAAAAAJxAAAAAAAAAAJxADCQAAZgAAAAIAAAAAAAAAArwFAAAABnJlc3VsdAUAAAAGcmVzdWx0AAAAAAAAAAK8AQAAAAthbm90aGVyY29lZgAAAAEAAAABcQQAAAADdmlnAAAAAAAAAAA0BAAAAAZyZXN1bHQJAABsAAAABgkAAGUAAAACCQAAZAAAAAIFAAAAA3ZpZwAAAAAAAAAD6AkAAGkAAAACAAAAAAAAAYagBQAAAAFxAAAAAAAAAAAAAP//////////AAAAAAAAAAAAAAAAAAAAAAAFBQAAAARET1dOAwkAAGYAAAACAAAAAAAAAAK8BQAAAAZyZXN1bHQFAAAABnJlc3VsdAAAAAAAAAACv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2gwAgAAAAdCb29sZWFuBAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiCQEAAAAFdGhyb3cAAAAAAwUAAAAGZXZlbnQxCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQAEJQAAAAEIBQAAAApjb250ZXh0T2JqAAAABmNhbGxlcgIAAAANX2V2ZW50MWFtb3VudAAAAAAAAAAAAAUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAApjb250ZXh0T2JqAAAABmNhbGxlcgkAAGgAAAACBQAAAAxldmVudDFhbW91bnQAAAAAAAAPQkAFAAAABHVuaXQFAAAAA25pbAMFAAAABmV2ZW50MgkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkABCUAAAABCAUAAAAKY29udGV4dE9iagAAAAZjYWxsZXICAAAADV9ldmVudDJhbW91bnQAAAAAAAAAAAAFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAAKY29udGV4dE9iagAAAAZjYWxsZXIJAABoAAAAAgUAAAAMZXZlbnQyYW1vdW50AAAAAAAAD0JABQAAAAR1bml0BQAAAANuaWwJAAACAAAAAQIAAAApZXZlbnQgZGlkIG5vdCBoYXBwZW4gb3IgeW91IGhhdmUgemVybyB3aW4AAAAACcd20A==", "chainId": 84, "height": 684684, "spentComplexity": 0 } View: original | compacted Prev: CXKxmAD58gd2EsciJZG73Dmke4dve3UwcegaiRuKS8sz Next: none Diff:
OldNewDifferences
99
1010 func d (e,f) = {
1111 let g = ((e * (((-47 * f) * f) + 10000)) / 10000)
12- if ((500 > g))
12+ if ((700 > g))
1313 then g
14- else 500
14+ else 700
1515 }
1616
1717
1818 func h (e) = {
1919 let i = 52
2020 let g = pow(((i + 1000) - (100000 / e)), 0, -1, 0, 5, DOWN)
21- if ((500 > g))
21+ if ((700 > g))
2222 then g
23- else 500
23+ else 700
2424 }
2525
2626
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 = 10
99
1010 func d (e,f) = {
1111 let g = ((e * (((-47 * f) * f) + 10000)) / 10000)
12- if ((500 > g))
12+ if ((700 > g))
1313 then g
14- else 500
14+ else 700
1515 }
1616
1717
1818 func h (e) = {
1919 let i = 52
2020 let g = pow(((i + 1000) - (100000 / e)), 0, -1, 0, 5, DOWN)
21- if ((500 > g))
21+ if ((700 > g))
2222 then g
23- else 500
23+ else 700
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 f = (o - p)
4444 let r = {
4545 let m = getInteger(this, (toString(j.caller) + "_event1amount"))
4646 if ($isInstanceOf(m, "Unit"))
4747 then {
4848 let s = m
4949 0
5050 }
5151 else if ($isInstanceOf(m, "Int"))
5252 then {
5353 let t = m
5454 t
5555 }
5656 else throw()
5757 }
5858 let u = {
5959 let m = getInteger(this, (toString(j.caller) + "_event2amount"))
6060 if ($isInstanceOf(m, "Unit"))
6161 then {
6262 let s = m
6363 0
6464 }
6565 else if ($isInstanceOf(m, "Int"))
6666 then {
6767 let t = m
6868 t
6969 }
7070 else throw()
7171 }
7272 if ((k == 1))
7373 then {
7474 let v = d(a, ((o + 1) - p))
7575 let w = h(v)
7676 if (if ((100 > v))
7777 then true
7878 else (100 > w))
7979 then throw(("to low coef q1 = " + toString(d(a, ((o + 1) - p)))))
8080 else {
8181 let x = (o + 1)
8282 let y = (q + 1)
8383 WriteSet([DataEntry((toString(j.caller) + "_event1amount"), (r + d(a, (o - p)))), DataEntry((toString(y) + "_event"), k), DataEntry((toString(y) + "_qoef1"), d(a, (o - p))), DataEntry((toString(y) + "_qoef2"), h(d(a, (o - p)))), DataEntry((toString(y) + "_bettor"), toString(j.caller)), DataEntry("q1_next", v), DataEntry("q2_next", w), DataEntry("n", x), DataEntry("count", y)])
8484 }
8585 }
8686 else {
8787 let v = d(a, ((o - 1) - p))
8888 let w = h(v)
8989 if (if ((100 > v))
9090 then true
9191 else (100 > w))
9292 then throw(("to low coef q2 = " + toString(h(d(a, ((o - p) - 1))))))
9393 else {
9494 let z = (p + 1)
9595 let y = (q + 1)
9696 WriteSet([DataEntry((toString(j.caller) + "_event2amount"), (u + h(d(a, (o - p))))), DataEntry((toString(y) + "_event"), k), DataEntry((toString(y) + "_qoef2"), h(d(a, (o - p)))), DataEntry((toString(y) + "_bettor"), toString(j.caller)), DataEntry("q1_next", v), DataEntry("q2_next", w), DataEntry((toString(y) + "_qoef1"), d(a, (o - p))), DataEntry("m", z), DataEntry("count", y)])
9797 }
9898 }
9999 }
100100
101101
102102
103103 @Callable(j)
104104 func withdraw () = {
105105 let r = {
106106 let m = getInteger(this, (toString(j.caller) + "_event1amount"))
107107 if ($isInstanceOf(m, "Unit"))
108108 then {
109109 let s = m
110110 0
111111 }
112112 else if ($isInstanceOf(m, "Int"))
113113 then {
114114 let t = m
115115 t
116116 }
117117 else throw()
118118 }
119119 let u = {
120120 let m = getInteger(this, (toString(j.caller) + "_event2amount"))
121121 if ($isInstanceOf(m, "Unit"))
122122 then {
123123 let s = m
124124 0
125125 }
126126 else if ($isInstanceOf(m, "Int"))
127127 then {
128128 let t = m
129129 t
130130 }
131131 else throw()
132132 }
133133 let A = {
134134 let m = getBoolean(this, "result_event_1")
135135 if ($isInstanceOf(m, "Unit"))
136136 then {
137137 let s = m
138138 false
139139 }
140140 else if ($isInstanceOf(m, "Boolean"))
141141 then {
142142 let B = m
143143 B
144144 }
145145 else throw()
146146 }
147147 let C = {
148148 let m = getBoolean(this, "result_event_2")
149149 if ($isInstanceOf(m, "Unit"))
150150 then {
151151 let s = m
152152 false
153153 }
154154 else if ($isInstanceOf(m, "Boolean"))
155155 then {
156156 let B = m
157157 B
158158 }
159159 else throw()
160160 }
161161 if (A)
162162 then ScriptResult(WriteSet([DataEntry((toString(j.caller) + "_event1amount"), 0)]), TransferSet([ScriptTransfer(j.caller, (r * 1000000), unit)]))
163163 else if (C)
164164 then ScriptResult(WriteSet([DataEntry((toString(j.caller) + "_event2amount"), 0)]), TransferSet([ScriptTransfer(j.caller, (u * 1000000), unit)]))
165165 else throw("event did not happen or you have zero win")
166166 }
167167
168168

github/deemru/w8io/169f3d6 
41.14 ms