tx · Bok6FsJjEFRFDR1rsesSEtQMzeWsbv5UbJGUFFLUQExU

3N78mWnEqz1PUDVJjBgoyivJpitqpxwVAgH:  -0.01400000 Waves

2019.09.17 11:25 [680001] smart account 3N78mWnEqz1PUDVJjBgoyivJpitqpxwVAgH > SELF 0.00000000 Waves

{ "type": 13, "id": "Bok6FsJjEFRFDR1rsesSEtQMzeWsbv5UbJGUFFLUQExU", "fee": 1400000, "feeAssetId": null, "timestamp": 1568708689274, "version": 1, "sender": "3N78mWnEqz1PUDVJjBgoyivJpitqpxwVAgH", "senderPublicKey": "88re7tFwGU4jjye6Kxg3U4cKzYz7FooSWnqP2NNMfRt5", "proofs": [ "UqhXAHUFQHTs9RdTDJkF1ZRZyytP2ht5j5nKm9fddsiBBVtyh2q4UDpZy8isJKpLMU7WFC8CafmprZDipz2s63e" ], "script": "base64:AAIDAAAAAAAAAAAAAAAFAAAAAAdxMXN0YXJ0AAAAAAAAAAC+AAAAAAdxMnN0YXJ0AAAAAAAAAAC+AAAAAAFzAAAAAAAAAAAKAQAAAARjb2VmAAAAAgAAAAFxAAAAA2RpZgkAAGkAAAACCQAAaAAAAAIFAAAAAXEJAABkAAAAAgkAAGgAAAACCQAAaAAAAAIA/////////9EFAAAAA2RpZgUAAAADZGlmAAAAAAAAACcQAAAAAAAAACcQAQAAAAthbm90aGVyY29lZgAAAAEAAAABcQQAAAADdmlnAAAAAAAAAAA0CQAAbAAAAAYJAABlAAAAAgkAAGQAAAACBQAAAAN2aWcAAAAAAAAAA+gJAABpAAAAAgAAAAAAAAGGoAUAAAABcQAAAAAAAAAAAAD//////////wAAAAAAAAAAAAAAAAAAAAAABQUAAAAERE9XTgAAAAIAAAAKY29udGV4dE9iagEAAAADYmV0AAAAAQAAAAVldmVudAQAAAABbgkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwIAAAABbgQAAAABbQkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwIAAAAB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AAAWWx/8A==", "chainId": 84, "height": 680001, "spentComplexity": 0 } View: original | compacted Prev: 35SHfw2KPBjCwMwM5hwjTLo1y5ekXuEzJAgjjMMeQ1qH Next: BTx96z3wnvk1pRkPLahJUzZuntirF4bXYd27H4sQVtb4 Diff:
OldNewDifferences
9595 then ScriptResult(WriteSet([DataEntry((toString(contextObj.caller) + "_event1amount"), 0)]), TransferSet([ScriptTransfer(contextObj.caller, (event1amount * 1000000), unit)]))
9696 else if (event2)
9797 then ScriptResult(WriteSet([DataEntry((toString(contextObj.caller) + "_event2amount"), 0)]), TransferSet([ScriptTransfer(contextObj.caller, (event2amount * 1000000), unit)]))
98- else throw("12122")
98+ else throw("event did not happen or you have zero win")
9999 }
100100
101101
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let q1start = 190
55
66 let q2start = 190
77
88 let s = 10
99
1010 func coef (q,dif) = ((q * (((-47 * dif) * dif) + 10000)) / 10000)
1111
1212
1313 func anothercoef (q) = {
1414 let vig = 52
1515 pow(((vig + 1000) - (100000 / q)), 0, -1, 0, 5, DOWN)
1616 }
1717
1818
1919 @Callable(contextObj)
2020 func bet (event) = {
2121 let n = getIntegerValue(this, "n")
2222 let m = getIntegerValue(this, "m")
2323 let count = getIntegerValue(this, "count")
2424 let dif = (n - m)
2525 let event1amount = match getInteger(this, (toString(contextObj.caller) + "_event1amount")) {
2626 case u: Unit =>
2727 0
2828 case i: Int =>
2929 i
3030 case _ =>
3131 throw()
3232 }
3333 let event2amount = match getInteger(this, (toString(contextObj.caller) + "_event2amount")) {
3434 case u: Unit =>
3535 0
3636 case i: Int =>
3737 i
3838 case _ =>
3939 throw()
4040 }
4141 if ((event == 1))
4242 then if ((100 >= coef(q1start, ((n + 1) - m))))
4343 then throw("to low coef")
4444 else {
4545 let nNew = (n + 1)
4646 let countNew = (count + 1)
4747 WriteSet([DataEntry((toString(contextObj.caller) + "_event1amount"), (event1amount + coef(q1start, (n - m)))), DataEntry((toString(countNew) + "_event"), event), DataEntry((toString(countNew) + "_qoef1"), coef(q1start, (n - m))), DataEntry((toString(countNew) + "_qoef2"), anothercoef(coef(q1start, (n - m)))), DataEntry("q1_next", coef(q1start, ((n + 1) - m))), DataEntry("q2_next", anothercoef(coef(q1start, ((n + 1) - m)))), DataEntry("n", nNew), DataEntry("count", countNew)])
4848 }
4949 else if ((100 >= anothercoef(coef(q1start, ((n - m) - 1)))))
5050 then throw("to low coef")
5151 else {
5252 let mNew = (m + 1)
5353 let countNew = (count + 1)
5454 WriteSet([DataEntry((toString(contextObj.caller) + "_event2amount"), (event2amount + anothercoef(coef(q1start, (n - m))))), DataEntry((toString(countNew) + "_event"), event), DataEntry((toString(countNew) + "_qoef2"), anothercoef(coef(q1start, (n - m)))), DataEntry("q1_next", coef(q1start, ((n - 1) - m))), DataEntry("q2_next", anothercoef(coef(q1start, ((n - 1) - m)))), DataEntry((toString(countNew) + "_qoef1"), coef(q1start, (n - m))), DataEntry("m", mNew), DataEntry("count", countNew)])
5555 }
5656 }
5757
5858
5959
6060 @Callable(contextObj)
6161 func withdraw () = {
6262 let event1amount = match getInteger(this, (toString(contextObj.caller) + "_event1amount")) {
6363 case u: Unit =>
6464 0
6565 case i: Int =>
6666 i
6767 case _ =>
6868 throw()
6969 }
7070 let event2amount = match getInteger(this, (toString(contextObj.caller) + "_event2amount")) {
7171 case u: Unit =>
7272 0
7373 case i: Int =>
7474 i
7575 case _ =>
7676 throw()
7777 }
7878 let event1 = match getBoolean(this, "result_event_1") {
7979 case u: Unit =>
8080 false
8181 case b: Boolean =>
8282 b
8383 case _ =>
8484 throw()
8585 }
8686 let event2 = match getBoolean(this, "result_event_2") {
8787 case u: Unit =>
8888 false
8989 case b: Boolean =>
9090 b
9191 case _ =>
9292 throw()
9393 }
9494 if (event1)
9595 then ScriptResult(WriteSet([DataEntry((toString(contextObj.caller) + "_event1amount"), 0)]), TransferSet([ScriptTransfer(contextObj.caller, (event1amount * 1000000), unit)]))
9696 else if (event2)
9797 then ScriptResult(WriteSet([DataEntry((toString(contextObj.caller) + "_event2amount"), 0)]), TransferSet([ScriptTransfer(contextObj.caller, (event2amount * 1000000), unit)]))
98- else throw("12122")
98+ else throw("event did not happen or you have zero win")
9999 }
100100
101101

github/deemru/w8io/026f985 
30.53 ms