tx · 97RQB6WTPeR9Urgm2JBwLKSFUVVjehfv3BD3CLeFWaBs

3N78mWnEqz1PUDVJjBgoyivJpitqpxwVAgH:  -0.01400000 Waves

2019.09.12 18:36 [673114] smart account 3N78mWnEqz1PUDVJjBgoyivJpitqpxwVAgH > SELF 0.00000000 Waves

{ "type": 13, "id": "97RQB6WTPeR9Urgm2JBwLKSFUVVjehfv3BD3CLeFWaBs", "fee": 1400000, "feeAssetId": null, "timestamp": 1568302599066, "version": 1, "sender": "3N78mWnEqz1PUDVJjBgoyivJpitqpxwVAgH", "senderPublicKey": "88re7tFwGU4jjye6Kxg3U4cKzYz7FooSWnqP2NNMfRt5", "proofs": [ "3Yh38DnkFJ9aK8ymgm7ZSFGBScKAdweP4HrvxWQDjxmZFFfjrg1SgU8rxYLoe173uAEUvU1xFQTdyNrfWJqfgAsr" ], "script": "base64:AAIDAAAAAAAAAAAAAAAFAAAAAAdxMXN0YXJ0AAAAAAAAAAC+AAAAAAdxMnN0YXJ0AAAAAAAAAAC+AAAAAAFzAAAAAAAAAAAKAQAAAARjb2VmAAAAAgAAAAFxAAAAA2RpZgkAAGkAAAACCQAAaAAAAAIFAAAAAXEJAABkAAAAAgkAAGgAAAACCQAAaAAAAAIA//////////wFAAAAA2RpZgUAAAADZGlmAAAAAAAAAAPoAAAAAAAAAAPoAQAAAAthbm90aGVyY29lZgAAAAEAAAABcQQAAAADdmlnAAAAAAAAAAA0CQAAbAAAAAYJAABlAAAAAgkAAGQAAAACBQAAAAN2aWcAAAAAAAAAA+gJAABpAAAAAgAAAAAAAAGGoAUAAAABcQAAAAAAAAAAAAD//////////wAAAAAAAAAAAAAAAAAAAAAABQUAAAAERE9XTgAAAAEAAAAKY29udGV4dE9iagEAAAADYmV0AAAAAQAAAAVldmVudAQAAAABbgkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwIAAAABbgQAAAABbQkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhp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AAAgAAAAECAAAAC3RvIGxvdyBjb2VmBAAAAARtTmV3CQAAZAAAAAIFAAAAAW0AAAAAAAAAAAEEAAAACGNvdW50TmV3CQAAZAAAAAIFAAAABWNvdW50AAAAAAAAAAABCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAGkAAAAAQUAAAAIY291bnROZXcCAAAABl9ldmVudAUAAAAFZXZlbnQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAAaQAAAABBQAAAAhjb3VudE5ldwIAAAAGX3FvZWYyCQEAAAAEY29lZgAAAAIFAAAAB3Eyc3RhcnQJAABlAAAAAgUAAAABbgUAAAABbQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABpAAAAAEFAAAACGNvdW50TmV3AgAAAAZfcW9lZjEJAQAAAAthbm90aGVyY29lZgAAAAEJAQAAAARjb2VmAAAAAgUAAAAHcTJzdGFydAkAAGUAAAACBQAAAAFuBQAAAAFtCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAAFtBQAAAARtTmV3CQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAAVjb3VudAUAAAAIY291bnROZXcFAAAAA25pbAAAAAEAAAAKY29udGV4dE9iagEAAAAGdmVyaWZ5AAAAAAa0GyM5", "chainId": 84, "height": 673114, "spentComplexity": 0 } View: original | compacted Prev: AmBgtRR492Mtm4wi8H3UrdtAntHRo9MHrJjSH4HPz6cw Next: 6qJLz6njC65JSDj1z7NF4N9rf564fNLBxZHaoujHX2xS Diff:
OldNewDifferences
3333 else if ((100 > coef(q2start, ((n - m) - 1))))
3434 then throw("to low coef")
3535 else {
36- let mNew = (n + 1)
36+ let mNew = (m + 1)
3737 let countNew = (count + 1)
3838 WriteSet([DataEntry((toString(countNew) + "_event"), event), DataEntry((toString(countNew) + "_qoef2"), coef(q2start, (n - m))), DataEntry((toString(countNew) + "_qoef1"), anothercoef(coef(q2start, (n - m)))), DataEntry("m", mNew), DataEntry("count", countNew)])
3939 }
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 * (((-4 * dif) * dif) + 1000)) / 1000)
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 if ((event == 1))
2626 then if ((100 > coef(q1start, ((n + 1) - m))))
2727 then throw("to low coef")
2828 else {
2929 let nNew = (n + 1)
3030 let countNew = (count + 1)
3131 WriteSet([DataEntry((toString(countNew) + "_event"), event), DataEntry((toString(countNew) + "_qoef1"), coef(q1start, (n - m))), DataEntry((toString(countNew) + "_qoef2"), anothercoef(coef(q1start, (n - m)))), DataEntry("n", nNew), DataEntry("count", countNew)])
3232 }
3333 else if ((100 > coef(q2start, ((n - m) - 1))))
3434 then throw("to low coef")
3535 else {
36- let mNew = (n + 1)
36+ let mNew = (m + 1)
3737 let countNew = (count + 1)
3838 WriteSet([DataEntry((toString(countNew) + "_event"), event), DataEntry((toString(countNew) + "_qoef2"), coef(q2start, (n - m))), DataEntry((toString(countNew) + "_qoef1"), anothercoef(coef(q2start, (n - m)))), DataEntry("m", mNew), DataEntry("count", countNew)])
3939 }
4040 }
4141
4242
4343 @Verifier(contextObj)
4444 func verify () = true
4545

github/deemru/w8io/026f985 
41.04 ms