tx · 7JvNp7YobMAUjZVHh3Ao65CPWB6AjcMt5GFWaeEZdqBP

3MpDyhdDDnQX4ZczyFxswwaaC46DWe4baRX:  -0.01400000 Waves

2019.09.20 11:39 [684409] smart account 3MpDyhdDDnQX4ZczyFxswwaaC46DWe4baRX > SELF 0.00000000 Waves

{ "type": 13, "id": "7JvNp7YobMAUjZVHh3Ao65CPWB6AjcMt5GFWaeEZdqBP", "fee": 1400000, "feeAssetId": null, "timestamp": 1568968847565, "version": 1, "sender": "3MpDyhdDDnQX4ZczyFxswwaaC46DWe4baRX", "senderPublicKey": "AxiRXYHSeXqrnLPNFD86aRSRJLPJZkNWVZN5BEUQQSdu", "proofs": [ "3pd9inNfQVMMJTVMjGUQtEYC7jJVkBytZTDmVcwWNVPMFPHEsXW2oUUVby6dmjmWiUcMJvD3VTnBHbhhh2YgMC2D" ], "script": "base64:AAIDAAAAAAAAAAAAAAAFAAAAAAdxMXN0YXJ0AAAAAAAAAAC+AAAAAAdxMnN0YXJ0AAAAAAAAAAC+AAAAAAFzAAAAAAAAAAAKAQAAAARjb2VmAAAAAgAAAAFxAAAAA2RpZgkAAGkAAAACCQAAaAAAAAIFAAAAAXEJAABkAAAAAgkAAGgAAAACCQAAaAAAAAIA/////////9EFAAAAA2RpZgUAAAADZGlmAAAAAAAAACcQAAAAAAAAACcQAQAAAAthbm90aGVyY29lZgAAAAEAAAABcQQAAAADdmlnAAAAAAAAAAA0CQAAbAAAAAYJAABlAAAAAgkAAGQAAAACBQAAAAN2aWcAAAAAAAAAA+gJAABpAAAAAgAAAAAAAAGGoAUAAAABcQAAAAAAAAAAAAD//////////wAAAAAAAAAAAAAAAAAAAAAABQUAAAAERE9XTgAAAAIAAAAKY29udGV4dE9iagEAAAADYmV0AAAAAQAAAAVldmVudAQAAAABbgkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwIAAAABbgQAAAABbQkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdG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AAlEYXRhRW50cnkAAAACAgAAAAdxMl9uZXh0AgAAAARudWxsBQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAACmNvbnRleHRPYmoAAAAGY2FsbGVyCQAAaAAAAAIFAAAADGV2ZW50MWFtb3VudAAAAAAAAA9CQAUAAAAEdW5pdAUAAAADbmlsAwUAAAAGZXZlbnQyCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQAEJQAAAAEIBQAAAApjb250ZXh0T2JqAAAABmNhbGxlcgIAAAANX2V2ZW50MmFtb3VudAAAAAAAAAAAAAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgIAAAAHcTFfbmV4dAIAAAAEbnVsbAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgIAAAAHcTJfbmV4dAIAAAAEbnVsbAUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAApjb250ZXh0T2JqAAAABmNhbGxlcgkAAGgAAAACBQAAAAxldmVudDJhbW91bnQAAAAAAAAPQkAFAAAABHVuaXQFAAAAA25pbAkAAAIAAAABAgAAAClldmVudCBkaWQgbm90IGhhcHBlbiBvciB5b3UgaGF2ZSB6ZXJvIHdpbgAAAABItajz", "chainId": 84, "height": 684409, "spentComplexity": 0 } View: original | compacted Prev: BqVr4oZhbQ7bbcuQyk6Hr6dYPxSg5dxT9TfgEimAJaSm Next: none Diff:
OldNewDifferences
128128 else throw()
129129 }
130130 if (v)
131- then ScriptResult(WriteSet([DataEntry((toString(i.caller) + "_event1amount"), 0)]), TransferSet([ScriptTransfer(i.caller, (n * 1000000), unit)]))
131+ then ScriptResult(WriteSet([DataEntry((toString(i.caller) + "_event1amount"), 0), DataEntry("q1_next", "null"), DataEntry("q2_next", "null")]), TransferSet([ScriptTransfer(i.caller, (n * 1000000), unit)]))
132132 else if (x)
133- then ScriptResult(WriteSet([DataEntry((toString(i.caller) + "_event2amount"), 0)]), TransferSet([ScriptTransfer(i.caller, (r * 1000000), unit)]))
133+ then ScriptResult(WriteSet([DataEntry((toString(i.caller) + "_event2amount"), 0), DataEntry("q1_next", "null"), DataEntry("q2_next", "null")]), TransferSet([ScriptTransfer(i.caller, (r * 1000000), unit)]))
134134 else throw("event did not happen or you have zero win")
135135 }
136136
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) = ((e * (((-47 * f) * f) + 10000)) / 10000)
1111
1212
1313 func g (e) = {
1414 let h = 52
1515 pow(((h + 1000) - (100000 / e)), 0, -1, 0, 5, DOWN)
1616 }
1717
1818
1919 @Callable(i)
2020 func bet (j) = {
2121 let k = getIntegerValue(this, "n")
2222 let l = getIntegerValue(this, "m")
2323 let m = getIntegerValue(this, "count")
2424 let f = (k - l)
2525 let n = {
2626 let o = getInteger(this, (toString(i.caller) + "_event1amount"))
2727 if ($isInstanceOf(o, "Unit"))
2828 then {
2929 let p = o
3030 0
3131 }
3232 else if ($isInstanceOf(o, "Int"))
3333 then {
3434 let q = o
3535 q
3636 }
3737 else throw()
3838 }
3939 let r = {
4040 let o = getInteger(this, (toString(i.caller) + "_event2amount"))
4141 if ($isInstanceOf(o, "Unit"))
4242 then {
4343 let p = o
4444 0
4545 }
4646 else if ($isInstanceOf(o, "Int"))
4747 then {
4848 let q = o
4949 q
5050 }
5151 else throw()
5252 }
5353 if ((j == 1))
5454 then if ((100 > d(a, ((k + 1) - l))))
5555 then throw(("to low coef q1 = " + toString(d(a, ((k + 1) - l)))))
5656 else {
5757 let s = (k + 1)
5858 let t = (m + 1)
5959 WriteSet([DataEntry((toString(i.caller) + "_event1amount"), (n + d(a, (k - l)))), DataEntry((toString(t) + "_event"), j), DataEntry((toString(t) + "_qoef1"), d(a, (k - l))), DataEntry((toString(t) + "_qoef2"), g(d(a, (k - l)))), DataEntry((toString(t) + "_bettor"), toString(i.caller)), DataEntry("q1_next", d(a, ((k + 1) - l))), DataEntry("q2_next", g(d(a, ((k + 1) - l)))), DataEntry("n", s), DataEntry("count", t)])
6060 }
6161 else if ((100 > g(d(a, ((k - l) - 1)))))
6262 then throw(("to low coef q2 = " + toString(g(d(a, ((k - l) - 1))))))
6363 else {
6464 let u = (l + 1)
6565 let t = (m + 1)
6666 WriteSet([DataEntry((toString(i.caller) + "_event2amount"), (r + g(d(a, (k - l))))), DataEntry((toString(t) + "_event"), j), DataEntry((toString(t) + "_qoef2"), g(d(a, (k - l)))), DataEntry((toString(t) + "_bettor"), toString(i.caller)), DataEntry("q1_next", d(a, ((k - 1) - l))), DataEntry("q2_next", g(d(a, ((k - 1) - l)))), DataEntry((toString(t) + "_qoef1"), d(a, (k - l))), DataEntry("m", u), DataEntry("count", t)])
6767 }
6868 }
6969
7070
7171
7272 @Callable(i)
7373 func withdraw () = {
7474 let n = {
7575 let o = getInteger(this, (toString(i.caller) + "_event1amount"))
7676 if ($isInstanceOf(o, "Unit"))
7777 then {
7878 let p = o
7979 0
8080 }
8181 else if ($isInstanceOf(o, "Int"))
8282 then {
8383 let q = o
8484 q
8585 }
8686 else throw()
8787 }
8888 let r = {
8989 let o = getInteger(this, (toString(i.caller) + "_event2amount"))
9090 if ($isInstanceOf(o, "Unit"))
9191 then {
9292 let p = o
9393 0
9494 }
9595 else if ($isInstanceOf(o, "Int"))
9696 then {
9797 let q = o
9898 q
9999 }
100100 else throw()
101101 }
102102 let v = {
103103 let o = getBoolean(this, "result_event_1")
104104 if ($isInstanceOf(o, "Unit"))
105105 then {
106106 let p = o
107107 false
108108 }
109109 else if ($isInstanceOf(o, "Boolean"))
110110 then {
111111 let w = o
112112 w
113113 }
114114 else throw()
115115 }
116116 let x = {
117117 let o = getBoolean(this, "result_event_2")
118118 if ($isInstanceOf(o, "Unit"))
119119 then {
120120 let p = o
121121 false
122122 }
123123 else if ($isInstanceOf(o, "Boolean"))
124124 then {
125125 let w = o
126126 w
127127 }
128128 else throw()
129129 }
130130 if (v)
131- then ScriptResult(WriteSet([DataEntry((toString(i.caller) + "_event1amount"), 0)]), TransferSet([ScriptTransfer(i.caller, (n * 1000000), unit)]))
131+ then ScriptResult(WriteSet([DataEntry((toString(i.caller) + "_event1amount"), 0), DataEntry("q1_next", "null"), DataEntry("q2_next", "null")]), TransferSet([ScriptTransfer(i.caller, (n * 1000000), unit)]))
132132 else if (x)
133- then ScriptResult(WriteSet([DataEntry((toString(i.caller) + "_event2amount"), 0)]), TransferSet([ScriptTransfer(i.caller, (r * 1000000), unit)]))
133+ then ScriptResult(WriteSet([DataEntry((toString(i.caller) + "_event2amount"), 0), DataEntry("q1_next", "null"), DataEntry("q2_next", "null")]), TransferSet([ScriptTransfer(i.caller, (r * 1000000), unit)]))
134134 else throw("event did not happen or you have zero win")
135135 }
136136
137137

github/deemru/w8io/026f985 
44.17 ms