tx · 6jjyk9rAuk9Fsy5aJGxsuaeF93PKL2nVbHGcWpj5SMQS

3N3AeA5FWm7EHheHoik8BBEA3GXXJosnVY8:  -0.01400000 Waves

2019.10.07 14:13 [709291] smart account 3N3AeA5FWm7EHheHoik8BBEA3GXXJosnVY8 > SELF 0.00000000 Waves

{ "type": 13, "id": "6jjyk9rAuk9Fsy5aJGxsuaeF93PKL2nVbHGcWpj5SMQS", "fee": 1400000, "feeAssetId": null, "timestamp": 1570446782078, "version": 1, "sender": "3N3AeA5FWm7EHheHoik8BBEA3GXXJosnVY8", "senderPublicKey": "87US7E5SdpUB7rbkzLmEUKfYg7uihzCvRzEKy1mCNNjq", "proofs": [ "4xmSeDUGamYnYiTHVPPVh2Eu6EEzaUFnFqMYwmM5ZRa6FoRC7J7yfDiTJguRPE381PkL87edUsirc6pyNqW9WJ5L" ], "script": "base64:AAIDAAAAAAAAAAkIARIDCgEBEgAAAAAGAAAAAAdxMXN0YXJ0AAAAAAAAAAC+AAAAAAdxMnN0YXJ0AAAAAAAAAAC+AAAAAAN2aWcAAAAAAAAAAAUAAAAAAXMAAAAAAAAAAAoBAAAABGNvZWYAAAACAAAAAXEAAAADZGlmBAAAAARjb2VmCQAAaQAAAAIJAABoAAAAAgUAAAABcQkAAGQAAAACCQAAaAAAAAIJAABoAAAAAgD/////////0QUAAAADZGlmBQAAAANkaWYAAAAAAAAAJxAAAAAAAAAAJxAFAAAABGNvZWYBAAAAC2Fub3RoZXJjb2VmAAAAAgAAAAFxAAAAA2RpZgQAAAAJYWN0dWFsdmlnCQAAaQAAAAIJAABoAAAAAgUAAAADdmlnCQAAZAAAAAIJAABkAAAAAgkAAGgAAAACCQAAaAAAAAIA/////////6EFAAAAA2RpZgUAAAADZGlmCQAAaAAAAAIAAAAAAAAAB1UFAAAAA2RpZgAAAAAAAAAnEAAAAAAAAAAnEAQAAAALYW5vdGhlcmNvZWYJAABsAAAABgkAAGUAAAACCQAAZAAAAAIFAAAACWFjdHVhbHZpZwAA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NoMAIAAAAHQm9vbGVhbgQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgkBAAAABXRocm93AAAAAAMFAAAABmV2ZW50MQkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkABCUAAAABCAUAAAAKY29udGV4dE9iagAAAAZjYWxsZXICAAAADV9ldmVudDFhbW91bnQAAAAAAAAAAAAFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAAKY29udGV4dE9iagAAAAZjYWxsZXIJAABoAAAAAgUAAAAMZXZlbnQxYW1vdW50AAAAAAAAD0JABQAAAAR1bml0BQAAAANuaWwDBQAAAAZldmVudDIJAQAAAAxTY3JpcHRSZXN1bHQAAAACCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAQlAAAAAQgFAAAACmNvbnRleHRPYmoAAAAGY2FsbGVyAgAAAA1fZXZlbnQyYW1vdW50AAAAAAAAAAAABQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAACmNvbnRleHRPYmoAAAAGY2FsbGVyCQAAaAAAAAIFAAAADGV2ZW50MmFtb3VudAAAAAAAAA9CQAUAAAAEdW5pdAUAAAADbmlsCQAAAgAAAAECAAAAKWV2ZW50IGRpZCBub3QgaGFwcGVuIG9yIHlvdSBoYXZlIHplcm8gd2luAAAAAD7SwWI=", "chainId": 84, "height": 709291, "spentComplexity": 0 } View: original | compacted Prev: 2Ux5thrhHBmcJP51GNeJjJo1zUtjESf47BBrk15fSgVV Next: 8Xaa2RekedAUsaQj4CmXXNXmAgVUpXwe3LPEW4vxm3ct Diff:
OldNewDifferences
6969 let q2next = if (((dif - 1) >= 0))
7070 then coef(q2start, (dif - 1))
7171 else anothercoef(q2start, (dif - 1))
72- let nNew = (n + 1)
7372 let countNew = (count + 1)
74- WriteSet([DataEntry((toString(contextObj.caller) + "_event1amount"), (event1amount + coef(q1start, (n - m)))), DataEntry((toString(countNew) + "_event"), event), DataEntry((toString(countNew) + "_qoef1"), q1), DataEntry((toString(countNew) + "_qoef2"), q2), DataEntry((toString(countNew) + "_bettor"), toString(contextObj.caller)), DataEntry("q1_next", q1next), DataEntry("q2_next", q2next), DataEntry("n", nNew), DataEntry("count", countNew)])
73+ if ((event == 1))
74+ then if ((100 > q1))
75+ then throw(("to low coef q1 = " + toString(q1)))
76+ else {
77+ let nNew = (n + 1)
78+ WriteSet([DataEntry((toString(contextObj.caller) + "_event1amount"), (event1amount + q1)), DataEntry((toString(countNew) + "_event"), event), DataEntry((toString(countNew) + "_qoef1"), q1), DataEntry((toString(countNew) + "_qoef2"), q2), DataEntry((toString(countNew) + "_bettor"), toString(contextObj.caller)), DataEntry("q1_next", q1next), DataEntry("q2_next", q2next), DataEntry("n", nNew), DataEntry("count", countNew)])
79+ }
80+ else if ((100 > q2))
81+ then throw(("to low coef q2 = " + toString(q2)))
82+ else {
83+ let mNew = (m + 1)
84+ WriteSet([DataEntry((toString(contextObj.caller) + "_event2amount"), (event2amount + q2)), DataEntry((toString(countNew) + "_event"), event), DataEntry((toString(countNew) + "_qoef2"), q2), DataEntry((toString(countNew) + "_bettor"), toString(contextObj.caller)), DataEntry("q1_next", q1next), DataEntry("q2_next", q2next), DataEntry((toString(countNew) + "_qoef1"), coef(q1start, (n - m))), DataEntry("m", mNew), DataEntry("count", countNew)])
85+ }
7586 }
7687
7788
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 vig = 5
99
1010 let s = 10
1111
1212 func coef (q,dif) = {
1313 let coef = ((q * (((-47 * dif) * dif) + 10000)) / 10000)
1414 coef
1515 }
1616
1717
1818 func anothercoef (q,dif) = {
1919 let actualvig = ((vig * ((((-95 * dif) * dif) + (1877 * dif)) + 10000)) / 10000)
2020 let anothercoef = pow(((actualvig + 1000) - (100000 / q)), 0, -1, 0, 5, DOWN)
2121 if ((anothercoef > 270))
2222 then 270
2323 else anothercoef
2424 }
2525
2626
2727 @Callable(contextObj)
2828 func bet (event) = {
2929 let payment = match contextObj.payment {
3030 case p: AttachedPayment =>
3131 if ((100000000 > p.amount))
3232 then throw("low payment")
3333 else p
3434 case _ =>
3535 throw("Payment not attached")
3636 }
3737 let n = getIntegerValue(this, "n")
3838 let m = getIntegerValue(this, "m")
3939 let count = getIntegerValue(this, "count")
4040 let difold = (n - m)
4141 let event1amount = match getInteger(this, (toString(contextObj.caller) + "_event1amount")) {
4242 case u: Unit =>
4343 0
4444 case i: Int =>
4545 i
4646 case _ =>
4747 throw()
4848 }
4949 let event2amount = match getInteger(this, (toString(contextObj.caller) + "_event2amount")) {
5050 case u: Unit =>
5151 0
5252 case i: Int =>
5353 i
5454 case _ =>
5555 throw()
5656 }
5757 let dif = if ((event == 1))
5858 then (difold + 1)
5959 else (difold - 1)
6060 let q1 = if ((dif >= 0))
6161 then coef(q1start, dif)
6262 else anothercoef(q1start, dif)
6363 let q2 = if ((dif >= 0))
6464 then coef(q2start, dif)
6565 else anothercoef(q2start, dif)
6666 let q1next = if (((dif + 1) >= 0))
6767 then coef(q1start, (dif + 1))
6868 else anothercoef(q1start, (dif + 1))
6969 let q2next = if (((dif - 1) >= 0))
7070 then coef(q2start, (dif - 1))
7171 else anothercoef(q2start, (dif - 1))
72- let nNew = (n + 1)
7372 let countNew = (count + 1)
74- WriteSet([DataEntry((toString(contextObj.caller) + "_event1amount"), (event1amount + coef(q1start, (n - m)))), DataEntry((toString(countNew) + "_event"), event), DataEntry((toString(countNew) + "_qoef1"), q1), DataEntry((toString(countNew) + "_qoef2"), q2), DataEntry((toString(countNew) + "_bettor"), toString(contextObj.caller)), DataEntry("q1_next", q1next), DataEntry("q2_next", q2next), DataEntry("n", nNew), DataEntry("count", countNew)])
73+ if ((event == 1))
74+ then if ((100 > q1))
75+ then throw(("to low coef q1 = " + toString(q1)))
76+ else {
77+ let nNew = (n + 1)
78+ WriteSet([DataEntry((toString(contextObj.caller) + "_event1amount"), (event1amount + q1)), DataEntry((toString(countNew) + "_event"), event), DataEntry((toString(countNew) + "_qoef1"), q1), DataEntry((toString(countNew) + "_qoef2"), q2), DataEntry((toString(countNew) + "_bettor"), toString(contextObj.caller)), DataEntry("q1_next", q1next), DataEntry("q2_next", q2next), DataEntry("n", nNew), DataEntry("count", countNew)])
79+ }
80+ else if ((100 > q2))
81+ then throw(("to low coef q2 = " + toString(q2)))
82+ else {
83+ let mNew = (m + 1)
84+ WriteSet([DataEntry((toString(contextObj.caller) + "_event2amount"), (event2amount + q2)), DataEntry((toString(countNew) + "_event"), event), DataEntry((toString(countNew) + "_qoef2"), q2), DataEntry((toString(countNew) + "_bettor"), toString(contextObj.caller)), DataEntry("q1_next", q1next), DataEntry("q2_next", q2next), DataEntry((toString(countNew) + "_qoef1"), coef(q1start, (n - m))), DataEntry("m", mNew), DataEntry("count", countNew)])
85+ }
7586 }
7687
7788
7889
7990 @Callable(contextObj)
8091 func withdraw () = {
8192 let event1amount = match getInteger(this, (toString(contextObj.caller) + "_event1amount")) {
8293 case u: Unit =>
8394 0
8495 case i: Int =>
8596 i
8697 case _ =>
8798 throw()
8899 }
89100 let event2amount = match getInteger(this, (toString(contextObj.caller) + "_event2amount")) {
90101 case u: Unit =>
91102 0
92103 case i: Int =>
93104 i
94105 case _ =>
95106 throw()
96107 }
97108 let event1 = match getBoolean(this, "result_event_1") {
98109 case u: Unit =>
99110 false
100111 case b: Boolean =>
101112 b
102113 case _ =>
103114 throw()
104115 }
105116 let event2 = match getBoolean(this, "result_event_2") {
106117 case u: Unit =>
107118 false
108119 case b: Boolean =>
109120 b
110121 case _ =>
111122 throw()
112123 }
113124 if (event1)
114125 then ScriptResult(WriteSet([DataEntry((toString(contextObj.caller) + "_event1amount"), 0)]), TransferSet([ScriptTransfer(contextObj.caller, (event1amount * 1000000), unit)]))
115126 else if (event2)
116127 then ScriptResult(WriteSet([DataEntry((toString(contextObj.caller) + "_event2amount"), 0)]), TransferSet([ScriptTransfer(contextObj.caller, (event2amount * 1000000), unit)]))
117128 else throw("event did not happen or you have zero win")
118129 }
119130
120131

github/deemru/w8io/026f985 
29.40 ms