tx · 2Ux5thrhHBmcJP51GNeJjJo1zUtjESf47BBrk15fSgVV

3N3AeA5FWm7EHheHoik8BBEA3GXXJosnVY8:  -0.01400000 Waves

2019.10.07 13:49 [709259] smart account 3N3AeA5FWm7EHheHoik8BBEA3GXXJosnVY8 > SELF 0.00000000 Waves

{ "type": 13, "id": "2Ux5thrhHBmcJP51GNeJjJo1zUtjESf47BBrk15fSgVV", "fee": 1400000, "feeAssetId": null, "timestamp": 1570445390489, "version": 1, "sender": "3N3AeA5FWm7EHheHoik8BBEA3GXXJosnVY8", "senderPublicKey": "87US7E5SdpUB7rbkzLmEUKfYg7uihzCvRzEKy1mCNNjq", "proofs": [ "4qebywLpG8Stwbcq8FtwhazndxM4o3oDh4Zr89nzD6WhK1ehUCYZkNnikBTacxSY7EF9W95xXWWouhnXCf3CGHLz" ], "script": "base64:AAIDAAAAAAAAAAkIARIDCgEBEgAAAAAGAAAAAAdxMXN0YXJ0AAAAAAAAAAC+AAAAAAdxMnN0YXJ0AAAAAAAAAAC+AAAAAAN2aWcAAAAAAAAAAAUAAAAAAXMAAAAAAAAAAAoBAAAABGNvZWYAAAACAAAAAXEAAAADZGlmBAAAAARjb2VmCQAAaQAAAAIJAABoAAAAAgUAAAABcQkAAGQAAAACCQAAaAAAAAIJAABoAAAAAgD/////////0QUAAAADZGlmBQAAAANkaWYAAAAAAAAAJxAAAAAAAAAAJxAFAAAABGNvZWYBAAAAC2Fub3RoZXJjb2VmAAAAAgAAAAFxAAAAA2RpZgQAAAAJYWN0dWFsdmlnCQAAaQAAAAIJAABoAAAAAgUAAAADdmlnCQAAZAAAAAIJAABkAAAAAgkAAGgAAAACCQAAaAAAAAIA/////////6EFAAAAA2RpZgUAAAADZGlmCQAAaAAAAAIAAAAAAAAAB1UFAAAAA2RpZgAAAAAAAAAnEAAAAAAAAAAnEAQAAAALYW5vdGhlcmNvZWYJAABsAAAABgkAAGUAAAACCQAAZAAAAAIFAAAACWFjdHVhbHZpZwAAAAAAAAAD6AkA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AFdGhyb3cAAAAAAwUAAAAGZXZlbnQxCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQAEJQAAAAEIBQAAAApjb250ZXh0T2JqAAAABmNhbGxlcgIAAAANX2V2ZW50MWFtb3VudAAAAAAAAAAAAAUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAApjb250ZXh0T2JqAAAABmNhbGxlcgkAAGgAAAACBQAAAAxldmVudDFhbW91bnQAAAAAAAAPQkAFAAAABHVuaXQFAAAAA25pbAMFAAAABmV2ZW50MgkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkABCUAAAABCAUAAAAKY29udGV4dE9iagAAAAZjYWxsZXICAAAADV9ldmVudDJhbW91bnQAAAAAAAAAAAAFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAAKY29udGV4dE9iagAAAAZjYWxsZXIJAABoAAAAAgUAAAAMZXZlbnQyYW1vdW50AAAAAAAAD0JABQAAAAR1bml0BQAAAANuaWwJAAACAAAAAQIAAAApZXZlbnQgZGlkIG5vdCBoYXBwZW4gb3IgeW91IGhhdmUgemVybyB3aW4AAAAA9Ui1iQ==", "chainId": 84, "height": 709259, "spentComplexity": 0 } View: original | compacted Prev: 7jgSdEE1AWDQrBxi6KrsYNRvHPtd9qx7ratvUZLmff8p Next: 6jjyk9rAuk9Fsy5aJGxsuaeF93PKL2nVbHGcWpj5SMQS Diff:
OldNewDifferences
1717
1818 func h (f,g) = {
1919 let i = ((c * ((((-95 * g) * g) + (1877 * g)) + 10000)) / 10000)
20- let h = pow(((c + 1000) - (100000 / f)), 0, -1, 0, 5, DOWN)
20+ let h = pow(((i + 1000) - (100000 / f)), 0, -1, 0, 5, DOWN)
2121 if ((h > 270))
2222 then 270
2323 else h
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)
20- let h = pow(((c + 1000) - (100000 / f)), 0, -1, 0, 5, DOWN)
20+ 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 e(b, g)
8080 else h(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))
8585 then e(b, (g - 1))
8686 else h(b, (g - 1))
8787 let A = (o + 1)
8888 let B = (q + 1)
8989 WriteSet([DataEntry((toString(j.caller) + "_event1amount"), (s + e(a, (o - p)))), DataEntry((toString(B) + "_event"), k), DataEntry((toString(B) + "_qoef1"), w), DataEntry((toString(B) + "_qoef2"), x), DataEntry((toString(B) + "_bettor"), toString(j.caller)), DataEntry("q1_next", y), DataEntry("q2_next", z), DataEntry("n", A), DataEntry("count", B)])
9090 }
9191
9292
9393
9494 @Callable(j)
9595 func withdraw () = {
9696 let s = {
9797 let m = getInteger(this, (toString(j.caller) + "_event1amount"))
9898 if ($isInstanceOf(m, "Unit"))
9999 then {
100100 let t = m
101101 0
102102 }
103103 else if ($isInstanceOf(m, "Int"))
104104 then {
105105 let u = m
106106 u
107107 }
108108 else throw()
109109 }
110110 let v = {
111111 let m = getInteger(this, (toString(j.caller) + "_event2amount"))
112112 if ($isInstanceOf(m, "Unit"))
113113 then {
114114 let t = m
115115 0
116116 }
117117 else if ($isInstanceOf(m, "Int"))
118118 then {
119119 let u = m
120120 u
121121 }
122122 else throw()
123123 }
124124 let C = {
125125 let m = getBoolean(this, "result_event_1")
126126 if ($isInstanceOf(m, "Unit"))
127127 then {
128128 let t = m
129129 false
130130 }
131131 else if ($isInstanceOf(m, "Boolean"))
132132 then {
133133 let D = m
134134 D
135135 }
136136 else throw()
137137 }
138138 let E = {
139139 let m = getBoolean(this, "result_event_2")
140140 if ($isInstanceOf(m, "Unit"))
141141 then {
142142 let t = m
143143 false
144144 }
145145 else if ($isInstanceOf(m, "Boolean"))
146146 then {
147147 let D = m
148148 D
149149 }
150150 else throw()
151151 }
152152 if (C)
153153 then ScriptResult(WriteSet([DataEntry((toString(j.caller) + "_event1amount"), 0)]), TransferSet([ScriptTransfer(j.caller, (s * 1000000), unit)]))
154154 else if (E)
155155 then ScriptResult(WriteSet([DataEntry((toString(j.caller) + "_event2amount"), 0)]), TransferSet([ScriptTransfer(j.caller, (v * 1000000), unit)]))
156156 else throw("event did not happen or you have zero win")
157157 }
158158
159159

github/deemru/w8io/169f3d6 
39.96 ms