tx · BhUvbkXrW1iPztsFimy2f5VEkT6xtivMoWNcBjEHUDhX
3N78mWnEqz1PUDVJjBgoyivJpitqpxwVAgH: -0.01400000 Waves
2019.09.12 18:00 [673078] smart account 3N78mWnEqz1PUDVJjBgoyivJpitqpxwVAgH > SELF 0.00000000 Waves
{
"type": 13,
"id": "BhUvbkXrW1iPztsFimy2f5VEkT6xtivMoWNcBjEHUDhX",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1568300439715,
"version": 1,
"sender": "3N78mWnEqz1PUDVJjBgoyivJpitqpxwVAgH",
"senderPublicKey": "88re7tFwGU4jjye6Kxg3U4cKzYz7FooSWnqP2NNMfRt5",
"proofs": [
"5sMNqhx9gqeUqyQAvN2PMNKhSTxnvnhpUfy6nQ7bR9AUAcr36M1hregacAJT98jMaKq5ijksGFVa3iVDiidyeKuv"
],
"script": "base64:AAIDAAAAAAAAAAAAAAAFAAAAAAdxMXN0YXJ0AAAAAAAAAAC+AAAAAAdxMnN0YXJ0AAAAAAAAAAC+AAAAAAFzAAAAAAAAAAAKAQAAAARjb2VmAAAAAgAAAAFxAAAAA2RpZgkAAGkAAAACCQAAaAAAAAIFAAAAAXEJAABkAAAAAgkAAGgAAAACCQAAaAAAAAIA//////////wFAAAAA2RpZgUAAAADZGlmAAAAAAAAAAPoAAAAAAAAAAPoAQAAAAthbm90aGVyY29lZgAAAAEAAAABcQQAAAADdmlnAAAAAAAAAAA0CQAAbAAAAAYJAABlAAAAAgkAAGQAAAACBQAAAAN2aWcAAAAAAAAAA+gJAABpAAAAAgAAAAAAAAAACgUAAAABcQAAAAAAAAAAAAD//////////wAAAAAAAAAAAAAAAAAAAAAABQUAAAAERE9XTgAAAAEAAAAKY29udGV4dE9iagEAAAADYmV0AAAAAQAAAAVldmVudAQAAAABbgkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwIAAAABbgQAAAABbQkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhp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AAAgAAAAECAAAAC3RvIGxvdyBjb2VmBAAAAARtTmV3CQAAZAAAAAIFAAAAAW4AAAAAAAAAAAEEAAAACGNvdW50TmV3CQAAZAAAAAIFAAAABWNvdW50AAAAAAAAAAABCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAGkAAAAAQUAAAAIY291bnROZXcCAAAABl9ldmVudAUAAAAFZXZlbnQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAAaQAAAABBQAAAAhjb3VudE5ldwIAAAAGX3FvZWYyCQEAAAAEY29lZgAAAAIFAAAAB3Eyc3RhcnQJAABlAAAAAgUAAAABbgUAAAABbQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABpAAAAAEFAAAACGNvdW50TmV3AgAAAAZfcW9lZjEJAQAAAAthbm90aGVyY29lZgAAAAEJAQAAAARjb2VmAAAAAgUAAAAHcTJzdGFydAkAAGUAAAACBQAAAAFuBQAAAAFtCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAAFuBQAAAARtTmV3CQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAAVjb3VudAUAAAAIY291bnROZXcFAAAAA25pbAAAAAEAAAAKY29udGV4dE9iagEAAAAGdmVyaWZ5AAAAAAbNWeet",
"chainId": 84,
"height": 673078,
"spentComplexity": 0
}
View: original | compacted
Prev: 4u5t1n7UzYj7cqFwL9ThTFWZMpr62z7MjRZMVLCSTtzz
Next: GArm4pZf1RoKQ7q1F63U3ngYSxaq9fJLBgMU7xoccmjR
Diff:
Old | New | | Differences |
---|
28 | 28 | | else { |
---|
29 | 29 | | let nNew = (n + 1) |
---|
30 | 30 | | let countNew = (count + 1) |
---|
31 | | - | WriteSet([DataEntry((toString(countNew) + "_event"), event), DataEntry((toString(countNew) + "_qoef"), coef(q1start, (n - m))), DataEntry("n", nNew), DataEntry("count", countNew)]) |
---|
| 31 | + | 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)]) |
---|
32 | 32 | | } |
---|
33 | 33 | | else if ((100 > coef(q2start, ((n - m) - 1)))) |
---|
34 | 34 | | then throw("to low coef") |
---|
35 | 35 | | else { |
---|
36 | 36 | | let mNew = (n + 1) |
---|
37 | 37 | | let countNew = (count + 1) |
---|
38 | | - | WriteSet([DataEntry((toString(countNew) + "_event"), event), DataEntry((toString(countNew) + "_qoef"), coef(q1start, (n - m))), DataEntry("n", mNew), DataEntry("count", countNew)]) |
---|
| 38 | + | WriteSet([DataEntry((toString(countNew) + "_event"), event), DataEntry((toString(countNew) + "_qoef2"), coef(q2start, (n - m))), DataEntry((toString(countNew) + "_qoef1"), anothercoef(coef(q2start, (n - m)))), DataEntry("n", mNew), DataEntry("count", countNew)]) |
---|
39 | 39 | | } |
---|
40 | 40 | | } |
---|
41 | 41 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let q1start = 190 |
---|
5 | 5 | | |
---|
6 | 6 | | let q2start = 190 |
---|
7 | 7 | | |
---|
8 | 8 | | let s = 10 |
---|
9 | 9 | | |
---|
10 | 10 | | func coef (q,dif) = ((q * (((-4 * dif) * dif) + 1000)) / 1000) |
---|
11 | 11 | | |
---|
12 | 12 | | |
---|
13 | 13 | | func anothercoef (q) = { |
---|
14 | 14 | | let vig = 52 |
---|
15 | 15 | | pow(((vig + 1000) - (10 / q)), 0, -1, 0, 5, DOWN) |
---|
16 | 16 | | } |
---|
17 | 17 | | |
---|
18 | 18 | | |
---|
19 | 19 | | @Callable(contextObj) |
---|
20 | 20 | | func bet (event) = { |
---|
21 | 21 | | let n = getIntegerValue(this, "n") |
---|
22 | 22 | | let m = getIntegerValue(this, "m") |
---|
23 | 23 | | let count = getIntegerValue(this, "count") |
---|
24 | 24 | | let dif = (n - m) |
---|
25 | 25 | | if ((event == 1)) |
---|
26 | 26 | | then if ((100 > coef(q1start, ((n + 1) - m)))) |
---|
27 | 27 | | then throw("to low coef") |
---|
28 | 28 | | else { |
---|
29 | 29 | | let nNew = (n + 1) |
---|
30 | 30 | | let countNew = (count + 1) |
---|
31 | | - | WriteSet([DataEntry((toString(countNew) + "_event"), event), DataEntry((toString(countNew) + "_qoef"), coef(q1start, (n - m))), DataEntry("n", nNew), DataEntry("count", countNew)]) |
---|
| 31 | + | 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)]) |
---|
32 | 32 | | } |
---|
33 | 33 | | else if ((100 > coef(q2start, ((n - m) - 1)))) |
---|
34 | 34 | | then throw("to low coef") |
---|
35 | 35 | | else { |
---|
36 | 36 | | let mNew = (n + 1) |
---|
37 | 37 | | let countNew = (count + 1) |
---|
38 | | - | WriteSet([DataEntry((toString(countNew) + "_event"), event), DataEntry((toString(countNew) + "_qoef"), coef(q1start, (n - m))), DataEntry("n", mNew), DataEntry("count", countNew)]) |
---|
| 38 | + | WriteSet([DataEntry((toString(countNew) + "_event"), event), DataEntry((toString(countNew) + "_qoef2"), coef(q2start, (n - m))), DataEntry((toString(countNew) + "_qoef1"), anothercoef(coef(q2start, (n - m)))), DataEntry("n", mNew), DataEntry("count", countNew)]) |
---|
39 | 39 | | } |
---|
40 | 40 | | } |
---|
41 | 41 | | |
---|
42 | 42 | | |
---|
43 | 43 | | @Verifier(contextObj) |
---|
44 | 44 | | func verify () = true |
---|
45 | 45 | | |
---|