tx · BK3adjmCZRo7muTam5XHzKW7gqEoydxjKaudwE94yZrt 3MpKmkFmjoGLpPWhScheYrN7fjdJAFp9tEX: -0.01400000 Waves 2020.10.09 19:56 [1213306] smart account 3MpKmkFmjoGLpPWhScheYrN7fjdJAFp9tEX > SELF 0.00000000 Waves
{ "type": 13, "id": "BK3adjmCZRo7muTam5XHzKW7gqEoydxjKaudwE94yZrt", "fee": 1400000, "feeAssetId": null, "timestamp": 1602262653105, "version": 2, "chainId": 84, "sender": "3MpKmkFmjoGLpPWhScheYrN7fjdJAFp9tEX", "senderPublicKey": "33Gr5uEJMDMKdRs25QUDvTeQ7q5EpGcAdPztrFvQWdv9", "proofs": [ "XTYoKnwTfxbhqyrUwrgAz4RuTrrrTfUNjnGXKKB9bMEJvmSUifysQQyK4rHZHEX5iVTVL8SbrDFV8uYGsdwmqY7" ], "script": "base64:AAIDAAAAAAAAAAkIARIAEgMKAQEAAAAIAAAAAAJhcgIAAAAjM04yaEhhcUVFWGpGSEU1RzhOVHc2djdLTk13Y0hvYjJFbmEAAAAAAWYAAAAAAAAAAGQAAAAAAXAAAAAAAAAAABQAAAAAA3ByMQAAAAAAAAAAAwAAAAADcHIyAAAAAAAAAAACAAAAAANwcjMAAAAAAAAAAAEBAAAADGdldFN0YXRpc3RpYwAAAAAEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwIAAAAJc3RhdGlzdGljAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWECAAAAETBfMF8wXzBfMF8wXzBfMF8wAQAAAAdnZXRVc2VyAAAAAQAAAAR1c2VyBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAABHVzZXIDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQIAAAAXMF8wXzBfMF8wXzBfMF8wXzBfMF8wXzAAAAACAAAAAWkB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AAAgkAAZEAAAACBQAAAAF1AAAAAAAAAAAAAgAAAAFfCQABkQAAAAIFAAAAAXUAAAAAAAAAAAECAAAAAV8JAAGkAAAAAQUAAAABbgIAAAABXwkAAZEAAAACBQAAAAF1AAAAAAAAAAADAgAAAAFfCQABkQAAAAIFAAAAAXUAAAAAAAAAAAQCAAAAAV8JAAGkAAAAAQkAAGQAAAACCQEAAAANcGFyc2VJbnRWYWx1ZQAAAAEJAAGRAAAAAgUAAAABdQAAAAAAAAAABQUAAAABeQIAAAABXwkAAaQAAAABCQAAZAAAAAIJAQAAAA1wYXJzZUludFZhbHVlAAAAAQkAAZEAAAACBQAAAAF1AAAAAAAAAAAGBQAAAAF5AgAAAAFfCQABkQAAAAIFAAAAAXUAAAAAAAAAAAcCAAAAAV8JAAGRAAAAAgUAAAABdQAAAAAAAAAACAIAAAABXwkAAZEAAAACBQAAAAF1AAAAAAAAAAAJAgAAAAFfCQABkQAAAAIFAAAAAXUAAAAAAAAAAAoCAAAAAl8wBQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAF5BQAAAAR1bml0BQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAAWQFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAAAQAAACAeTHPyrMVhDL+ASaN/GWQaSDU3pEw0FPX+njJctvxBMgbk5pEo", "height": 1213306, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AJCPnr6Z4JB6Na1zWv6fiqeri876VTZjyArn7J5uDPMR Next: ALDjPAiGt8oRiX2Xj9K4jBK1iK94CeNnj414EScriSga Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let | |
4 | + | let ar = "3N2hHaqEEXjFHE5G8NTw6v7KNMwcHob2Ena" | |
5 | 5 | ||
6 | - | let | |
6 | + | let f = 100 | |
7 | 7 | ||
8 | - | let | |
8 | + | let p = 20 | |
9 | 9 | ||
10 | - | let | |
10 | + | let pr1 = 3 | |
11 | 11 | ||
12 | - | let | |
12 | + | let pr2 = 2 | |
13 | 13 | ||
14 | - | let | |
14 | + | let pr3 = 1 | |
15 | 15 | ||
16 | 16 | func getStatistic () = match getString(this, "statistic") { | |
17 | 17 | case a: String => | |
31 | 31 | ||
32 | 32 | @Callable(i) | |
33 | 33 | func deposit () = { | |
34 | - | let | |
35 | - | let z = | |
36 | - | if (isDefined( | |
34 | + | let t = extract(i.payment) | |
35 | + | let z = t.amount | |
36 | + | if (isDefined(t.assetId)) | |
37 | 37 | then throw("can hodl waves only at the moment") | |
38 | 38 | else { | |
39 | - | let currentKey = toBase58String(i.caller.bytes) | |
40 | - | if ((currentKey == replenishmentAddress)) | |
41 | - | then { | |
42 | - | let s = split(getStatistic(), "_") | |
43 | - | WriteSet([DataEntry("statistic", ((((((((((((((((s[0] + "_") + s[1]) + "_") + s[2]) + "_") + s[3]) + "_") + s[4]) + "_") + s[5]) + "_") + s[6]) + "_") + toString((parseIntValue(s[7]) + z))) + "_") + s[8]))]) | |
44 | - | } | |
39 | + | let a = toBase58String(i.caller.bytes) | |
40 | + | let s = split(getStatistic(), "_") | |
41 | + | if ((a == ar)) | |
42 | + | then WriteSet([DataEntry("statistic", ((((((((((((((((s[0] + "_") + s[1]) + "_") + s[2]) + "_") + s[3]) + "_") + s[4]) + "_") + s[5]) + "_") + s[6]) + "_") + toString((parseIntValue(s[7]) + z))) + "_") + s[8]))]) | |
45 | 43 | else { | |
46 | - | let s = split(getStatistic(), "_") | |
47 | 44 | let h = lastBlock.height | |
48 | - | let x = ((z / 100) * (100 + | |
49 | - | let | |
50 | - | let u = split(getUser( | |
45 | + | let x = ((z / 100) * (100 + p)) | |
46 | + | let y = (x - z) | |
47 | + | let u = split(getUser(a), "_") | |
51 | 48 | let ud2 = parseIntValue(u[2]) | |
52 | 49 | if ((u[7] == "0")) | |
53 | - | then WriteSet([DataEntry("statistic", ((((((((((((((((toString((parseIntValue(s[0]) + z)) + "_") + toString((parseIntValue(s[1]) + 1))) + "_") + s[2]) + "_") + s[3]) + "_") + s[4]) + "_") + s[5]) + "_") + s[6]) + "_") + s[7]) + "_") + toString((parseIntValue(s[8]) + | |
50 | + | then WriteSet([DataEntry("statistic", ((((((((((((((((toString((parseIntValue(s[0]) + z)) + "_") + toString((parseIntValue(s[1]) + 1))) + "_") + s[2]) + "_") + s[3]) + "_") + s[4]) + "_") + s[5]) + "_") + s[6]) + "_") + s[7]) + "_") + toString((parseIntValue(s[8]) + y)))), DataEntry(a, ((((((((((((((((((((((toString((parseIntValue(u[0]) + z)) + "_") + toString((parseIntValue(u[1]) + x))) + "_") + toString((ud2 + x))) + "_") + toString(((ud2 + x) / f))) + "_") + toString(h)) + "_") + u[5]) + "_") + u[6]) + "_") + u[7]) + "_") + u[8]) + "_") + u[9]) + "_") + u[10]) + "_") + u[11]))]) | |
54 | 51 | else { | |
55 | 52 | let r1 = split(getUser(u[7]), "_") | |
56 | - | let | |
53 | + | let sr1 = ((z / 100) * pr1) | |
57 | 54 | if ((r1[7] == "0")) | |
58 | - | then WriteSet([DataEntry("statistic", ((((((((((((((((toString((parseIntValue(s[0]) + z)) + "_") + toString((parseIntValue(s[1]) + 1))) + "_") + s[2]) + "_") + s[3]) + "_") + toString((parseIntValue(s[4]) + | |
55 | + | then WriteSet([DataEntry("statistic", ((((((((((((((((toString((parseIntValue(s[0]) + z)) + "_") + toString((parseIntValue(s[1]) + 1))) + "_") + s[2]) + "_") + s[3]) + "_") + toString((parseIntValue(s[4]) + sr1))) + "_") + toString((parseIntValue(s[5]) + 1))) + "_") + s[6]) + "_") + s[7]) + "_") + toString(((parseIntValue(s[8]) + y) + sr1)))), DataEntry(a, ((((((((((((((((((((((toString((parseIntValue(u[0]) + z)) + "_") + toString((parseIntValue(u[1]) + x))) + "_") + toString((ud2 + x))) + "_") + toString(((ud2 + x) / f))) + "_") + toString(h)) + "_") + u[5]) + "_") + u[6]) + "_") + u[7]) + "_") + u[8]) + "_") + u[9]) + "_") + u[10]) + "_") + u[11])), DataEntry(u[7], ((((((((((((((((((((((r1[0] + "_") + r1[1]) + "_") + r1[2]) + "_") + r1[3]) + "_") + r1[4]) + "_") + r1[5]) + "_") + r1[6]) + "_") + r1[7]) + "_") + toString((parseIntValue(r1[8]) + sr1))) + "_") + r1[9]) + "_") + r1[10]) + "_") + toString((parseIntValue(r1[11]) + sr1))))]) | |
59 | 56 | else { | |
60 | 57 | let r2 = split(getUser(r1[7]), "_") | |
61 | - | let | |
58 | + | let sr2 = ((z / 100) * pr2) | |
62 | 59 | if ((r2[7] == "0")) | |
63 | - | then WriteSet([DataEntry("statistic", ((((((((((((((((toString((parseIntValue(s[0]) + z)) + "_") + toString((parseIntValue(s[1]) + 1))) + "_") + s[2]) + "_") + s[3]) + "_") + toString(((parseIntValue(s[4]) + | |
60 | + | then WriteSet([DataEntry("statistic", ((((((((((((((((toString((parseIntValue(s[0]) + z)) + "_") + toString((parseIntValue(s[1]) + 1))) + "_") + s[2]) + "_") + s[3]) + "_") + toString(((parseIntValue(s[4]) + sr1) + sr2))) + "_") + toString((parseIntValue(s[5]) + 2))) + "_") + s[6]) + "_") + s[7]) + "_") + toString((((parseIntValue(s[8]) + y) + sr1) + sr2)))), DataEntry(a, ((((((((((((((((((((((toString((parseIntValue(u[0]) + z)) + "_") + toString((parseIntValue(u[1]) + x))) + "_") + toString((ud2 + x))) + "_") + toString(((ud2 + x) / f))) + "_") + toString(h)) + "_") + u[5]) + "_") + u[6]) + "_") + u[7]) + "_") + u[8]) + "_") + u[9]) + "_") + u[10]) + "_") + u[11])), DataEntry(u[7], ((((((((((((((((((((((r1[0] + "_") + r1[1]) + "_") + r1[2]) + "_") + r1[3]) + "_") + r1[4]) + "_") + r1[5]) + "_") + r1[6]) + "_") + r1[7]) + "_") + toString((parseIntValue(r1[8]) + sr1))) + "_") + r1[9]) + "_") + r1[10]) + "_") + toString((parseIntValue(r1[11]) + sr1)))), DataEntry(r1[7], ((((((((((((((((((((((r2[0] + "_") + r2[1]) + "_") + r2[2]) + "_") + r2[3]) + "_") + r2[4]) + "_") + r2[5]) + "_") + r2[6]) + "_") + r2[7]) + "_") + r2[8]) + "_") + toString((parseIntValue(r2[9]) + sr2))) + "_") + r2[10]) + "_") + toString((parseIntValue(r2[11]) + sr2))))]) | |
64 | 61 | else { | |
65 | 62 | let r3 = split(getUser(r2[7]), "_") | |
66 | - | let | |
67 | - | WriteSet([DataEntry("statistic", ((((((((((((((((toString((parseIntValue(s[0]) + z)) + "_") + toString((parseIntValue(s[1]) + 1))) + "_") + s[2]) + "_") + s[3]) + "_") + toString((((parseIntValue(s[4]) + | |
63 | + | let sr3 = ((z / 100) * pr3) | |
64 | + | WriteSet([DataEntry("statistic", ((((((((((((((((toString((parseIntValue(s[0]) + z)) + "_") + toString((parseIntValue(s[1]) + 1))) + "_") + s[2]) + "_") + s[3]) + "_") + toString((((parseIntValue(s[4]) + sr1) + sr2) + sr3))) + "_") + toString((parseIntValue(s[5]) + 3))) + "_") + s[6]) + "_") + s[7]) + "_") + toString(((((parseIntValue(s[8]) + y) + sr1) + sr2) + sr3)))), DataEntry(a, ((((((((((((((((((((((toString((parseIntValue(u[0]) + z)) + "_") + toString((parseIntValue(u[1]) + x))) + "_") + toString((ud2 + x))) + "_") + toString(((ud2 + x) / f))) + "_") + toString(h)) + "_") + u[5]) + "_") + u[6]) + "_") + u[7]) + "_") + u[8]) + "_") + u[9]) + "_") + u[10]) + "_") + u[11])), DataEntry(u[7], ((((((((((((((((((((((r1[0] + "_") + r1[1]) + "_") + r1[2]) + "_") + r1[3]) + "_") + r1[4]) + "_") + r1[5]) + "_") + r1[6]) + "_") + r1[7]) + "_") + toString((parseIntValue(r1[8]) + sr1))) + "_") + r1[9]) + "_") + r1[10]) + "_") + toString((parseIntValue(r1[11]) + sr1)))), DataEntry(r1[7], ((((((((((((((((((((((r2[0] + "_") + r2[1]) + "_") + r2[2]) + "_") + r2[3]) + "_") + r2[4]) + "_") + r2[5]) + "_") + r2[6]) + "_") + r2[7]) + "_") + r2[8]) + "_") + toString((parseIntValue(r2[9]) + sr2))) + "_") + r2[10]) + "_") + toString((parseIntValue(r2[11]) + sr2)))), DataEntry(r2[7], ((((((((((((((((((((((r3[0] + "_") + r3[1]) + "_") + r3[2]) + "_") + r3[3]) + "_") + r3[4]) + "_") + r3[5]) + "_") + r3[6]) + "_") + r3[7]) + "_") + r3[8]) + "_") + r3[9]) + "_") + toString((parseIntValue(r3[10]) + sr3))) + "_") + toString((parseIntValue(r3[11]) + sr3))))]) | |
68 | 65 | } | |
69 | 66 | } | |
70 | 67 | } | |
75 | 72 | ||
76 | 73 | ||
77 | 74 | @Callable(i) | |
78 | - | func withdraw ( | |
79 | - | let | |
80 | - | let | |
81 | - | let | |
82 | - | let | |
83 | - | let | |
84 | - | let | |
85 | - | let | |
86 | - | let | |
87 | - | let | |
88 | - | let | |
89 | - | then | |
90 | - | else (( | |
91 | - | if ((0 > | |
75 | + | func withdraw (y) = { | |
76 | + | let a = toBase58String(i.caller.bytes) | |
77 | + | let u = split(getUser(a), "_") | |
78 | + | let s = split(getStatistic(), "_") | |
79 | + | let h = lastBlock.height | |
80 | + | let j = parseIntValue(u[1]) | |
81 | + | let x = parseIntValue(u[2]) | |
82 | + | let d = parseIntValue(u[3]) | |
83 | + | let b = parseIntValue(u[11]) | |
84 | + | let g = (j + f) | |
85 | + | let m = if ((h >= g)) | |
86 | + | then (x + b) | |
87 | + | else ((d * ((f - g) - h)) + b) | |
88 | + | if ((0 > y)) | |
92 | 89 | then throw("Can't withdraw negative amount") | |
93 | - | else if (( | |
94 | - | then | |
95 | - | else if ((0 > | |
90 | + | else if ((b >= y)) | |
91 | + | then ScriptResult(WriteSet([DataEntry("statistic", ((((((((((((((((s[0] + "_") + s[1]) + "_") + s[2]) + "_") + toString((parseIntValue(s[3]) + 1))) + "_") + s[4]) + "_") + s[5]) + "_") + toString((parseIntValue(s[6]) + y))) + "_") + s[7]) + "_") + s[8])), DataEntry(a, ((((((((((((((((((((((u[0] + "_") + u[1]) + "_") + u[2]) + "_") + u[3]) + "_") + u[4]) + "_") + toString((parseIntValue(u[5]) + y))) + "_") + toString((parseIntValue(u[6]) + y))) + "_") + u[7]) + "_") + u[8]) + "_") + u[9]) + "_") + u[10]) + "_") + toString((parseIntValue(u[11]) - y))))]), TransferSet([ScriptTransfer(i.caller, y, unit)])) | |
92 | + | else if ((0 > (m - y))) | |
96 | 93 | then throw("Not enough balance") | |
97 | - | else ScriptResult(WriteSet([DataEntry("statistic", (((((((((statistic[0] + "_") + statistic[1]) + "_") + toString((parseIntValue(statistic[2]) + amount))) + "_") + toString((parseIntValue(statistic[1]) + 1))) + "_") + statistic[4]) + statistic[5])), DataEntry(currentKey, ((((((((((((((((((((((user[0] + "_") + user[1]) + "_") + toString(newAmount)) + "_") + user[3]) + "_") + toString(blockHeight)) + "_") + toString((parseIntValue(user[5]) + amount))) + "_") + toString((parseIntValue(user[6]) + amount))) + "_") + user[7]) + "_") + user[8]) + "_") + user[9]) + "_") + user[10]) + "_") + user[11]))]), TransferSet([ScriptTransfer(i.caller, amount, unit)])) | |
94 | + | else { | |
95 | + | let n = ((x + b) - y) | |
96 | + | ScriptResult(WriteSet([DataEntry("statistic", ((((((((((((((((s[0] + "_") + s[1]) + "_") + toString(((parseIntValue(s[2]) + y) - parseIntValue(u[11])))) + "_") + toString((parseIntValue(s[3]) + 1))) + "_") + s[4]) + "_") + s[5]) + "_") + toString((parseIntValue(s[6]) + parseIntValue(u[11])))) + "_") + s[7]) + "_") + s[8])), DataEntry(a, (((((((((((((((((((((u[0] + "_") + u[1]) + "_") + toString(n)) + "_") + u[3]) + "_") + u[4]) + "_") + toString((parseIntValue(u[5]) + y))) + "_") + toString((parseIntValue(u[6]) + y))) + "_") + u[7]) + "_") + u[8]) + "_") + u[9]) + "_") + u[10]) + "_0"))]), TransferSet([ScriptTransfer(i.caller, y, unit)])) | |
97 | + | } | |
98 | 98 | } | |
99 | 99 | ||
100 | 100 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let | |
4 | + | let ar = "3N2hHaqEEXjFHE5G8NTw6v7KNMwcHob2Ena" | |
5 | 5 | ||
6 | - | let | |
6 | + | let f = 100 | |
7 | 7 | ||
8 | - | let | |
8 | + | let p = 20 | |
9 | 9 | ||
10 | - | let | |
10 | + | let pr1 = 3 | |
11 | 11 | ||
12 | - | let | |
12 | + | let pr2 = 2 | |
13 | 13 | ||
14 | - | let | |
14 | + | let pr3 = 1 | |
15 | 15 | ||
16 | 16 | func getStatistic () = match getString(this, "statistic") { | |
17 | 17 | case a: String => | |
18 | 18 | a | |
19 | 19 | case _ => | |
20 | 20 | "0_0_0_0_0_0_0_0_0" | |
21 | 21 | } | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func getUser (user) = match getString(this, user) { | |
25 | 25 | case a: String => | |
26 | 26 | a | |
27 | 27 | case _ => | |
28 | 28 | "0_0_0_0_0_0_0_0_0_0_0_0" | |
29 | 29 | } | |
30 | 30 | ||
31 | 31 | ||
32 | 32 | @Callable(i) | |
33 | 33 | func deposit () = { | |
34 | - | let | |
35 | - | let z = | |
36 | - | if (isDefined( | |
34 | + | let t = extract(i.payment) | |
35 | + | let z = t.amount | |
36 | + | if (isDefined(t.assetId)) | |
37 | 37 | then throw("can hodl waves only at the moment") | |
38 | 38 | else { | |
39 | - | let currentKey = toBase58String(i.caller.bytes) | |
40 | - | if ((currentKey == replenishmentAddress)) | |
41 | - | then { | |
42 | - | let s = split(getStatistic(), "_") | |
43 | - | WriteSet([DataEntry("statistic", ((((((((((((((((s[0] + "_") + s[1]) + "_") + s[2]) + "_") + s[3]) + "_") + s[4]) + "_") + s[5]) + "_") + s[6]) + "_") + toString((parseIntValue(s[7]) + z))) + "_") + s[8]))]) | |
44 | - | } | |
39 | + | let a = toBase58String(i.caller.bytes) | |
40 | + | let s = split(getStatistic(), "_") | |
41 | + | if ((a == ar)) | |
42 | + | then WriteSet([DataEntry("statistic", ((((((((((((((((s[0] + "_") + s[1]) + "_") + s[2]) + "_") + s[3]) + "_") + s[4]) + "_") + s[5]) + "_") + s[6]) + "_") + toString((parseIntValue(s[7]) + z))) + "_") + s[8]))]) | |
45 | 43 | else { | |
46 | - | let s = split(getStatistic(), "_") | |
47 | 44 | let h = lastBlock.height | |
48 | - | let x = ((z / 100) * (100 + | |
49 | - | let | |
50 | - | let u = split(getUser( | |
45 | + | let x = ((z / 100) * (100 + p)) | |
46 | + | let y = (x - z) | |
47 | + | let u = split(getUser(a), "_") | |
51 | 48 | let ud2 = parseIntValue(u[2]) | |
52 | 49 | if ((u[7] == "0")) | |
53 | - | then WriteSet([DataEntry("statistic", ((((((((((((((((toString((parseIntValue(s[0]) + z)) + "_") + toString((parseIntValue(s[1]) + 1))) + "_") + s[2]) + "_") + s[3]) + "_") + s[4]) + "_") + s[5]) + "_") + s[6]) + "_") + s[7]) + "_") + toString((parseIntValue(s[8]) + | |
50 | + | then WriteSet([DataEntry("statistic", ((((((((((((((((toString((parseIntValue(s[0]) + z)) + "_") + toString((parseIntValue(s[1]) + 1))) + "_") + s[2]) + "_") + s[3]) + "_") + s[4]) + "_") + s[5]) + "_") + s[6]) + "_") + s[7]) + "_") + toString((parseIntValue(s[8]) + y)))), DataEntry(a, ((((((((((((((((((((((toString((parseIntValue(u[0]) + z)) + "_") + toString((parseIntValue(u[1]) + x))) + "_") + toString((ud2 + x))) + "_") + toString(((ud2 + x) / f))) + "_") + toString(h)) + "_") + u[5]) + "_") + u[6]) + "_") + u[7]) + "_") + u[8]) + "_") + u[9]) + "_") + u[10]) + "_") + u[11]))]) | |
54 | 51 | else { | |
55 | 52 | let r1 = split(getUser(u[7]), "_") | |
56 | - | let | |
53 | + | let sr1 = ((z / 100) * pr1) | |
57 | 54 | if ((r1[7] == "0")) | |
58 | - | then WriteSet([DataEntry("statistic", ((((((((((((((((toString((parseIntValue(s[0]) + z)) + "_") + toString((parseIntValue(s[1]) + 1))) + "_") + s[2]) + "_") + s[3]) + "_") + toString((parseIntValue(s[4]) + | |
55 | + | then WriteSet([DataEntry("statistic", ((((((((((((((((toString((parseIntValue(s[0]) + z)) + "_") + toString((parseIntValue(s[1]) + 1))) + "_") + s[2]) + "_") + s[3]) + "_") + toString((parseIntValue(s[4]) + sr1))) + "_") + toString((parseIntValue(s[5]) + 1))) + "_") + s[6]) + "_") + s[7]) + "_") + toString(((parseIntValue(s[8]) + y) + sr1)))), DataEntry(a, ((((((((((((((((((((((toString((parseIntValue(u[0]) + z)) + "_") + toString((parseIntValue(u[1]) + x))) + "_") + toString((ud2 + x))) + "_") + toString(((ud2 + x) / f))) + "_") + toString(h)) + "_") + u[5]) + "_") + u[6]) + "_") + u[7]) + "_") + u[8]) + "_") + u[9]) + "_") + u[10]) + "_") + u[11])), DataEntry(u[7], ((((((((((((((((((((((r1[0] + "_") + r1[1]) + "_") + r1[2]) + "_") + r1[3]) + "_") + r1[4]) + "_") + r1[5]) + "_") + r1[6]) + "_") + r1[7]) + "_") + toString((parseIntValue(r1[8]) + sr1))) + "_") + r1[9]) + "_") + r1[10]) + "_") + toString((parseIntValue(r1[11]) + sr1))))]) | |
59 | 56 | else { | |
60 | 57 | let r2 = split(getUser(r1[7]), "_") | |
61 | - | let | |
58 | + | let sr2 = ((z / 100) * pr2) | |
62 | 59 | if ((r2[7] == "0")) | |
63 | - | then WriteSet([DataEntry("statistic", ((((((((((((((((toString((parseIntValue(s[0]) + z)) + "_") + toString((parseIntValue(s[1]) + 1))) + "_") + s[2]) + "_") + s[3]) + "_") + toString(((parseIntValue(s[4]) + | |
60 | + | then WriteSet([DataEntry("statistic", ((((((((((((((((toString((parseIntValue(s[0]) + z)) + "_") + toString((parseIntValue(s[1]) + 1))) + "_") + s[2]) + "_") + s[3]) + "_") + toString(((parseIntValue(s[4]) + sr1) + sr2))) + "_") + toString((parseIntValue(s[5]) + 2))) + "_") + s[6]) + "_") + s[7]) + "_") + toString((((parseIntValue(s[8]) + y) + sr1) + sr2)))), DataEntry(a, ((((((((((((((((((((((toString((parseIntValue(u[0]) + z)) + "_") + toString((parseIntValue(u[1]) + x))) + "_") + toString((ud2 + x))) + "_") + toString(((ud2 + x) / f))) + "_") + toString(h)) + "_") + u[5]) + "_") + u[6]) + "_") + u[7]) + "_") + u[8]) + "_") + u[9]) + "_") + u[10]) + "_") + u[11])), DataEntry(u[7], ((((((((((((((((((((((r1[0] + "_") + r1[1]) + "_") + r1[2]) + "_") + r1[3]) + "_") + r1[4]) + "_") + r1[5]) + "_") + r1[6]) + "_") + r1[7]) + "_") + toString((parseIntValue(r1[8]) + sr1))) + "_") + r1[9]) + "_") + r1[10]) + "_") + toString((parseIntValue(r1[11]) + sr1)))), DataEntry(r1[7], ((((((((((((((((((((((r2[0] + "_") + r2[1]) + "_") + r2[2]) + "_") + r2[3]) + "_") + r2[4]) + "_") + r2[5]) + "_") + r2[6]) + "_") + r2[7]) + "_") + r2[8]) + "_") + toString((parseIntValue(r2[9]) + sr2))) + "_") + r2[10]) + "_") + toString((parseIntValue(r2[11]) + sr2))))]) | |
64 | 61 | else { | |
65 | 62 | let r3 = split(getUser(r2[7]), "_") | |
66 | - | let | |
67 | - | WriteSet([DataEntry("statistic", ((((((((((((((((toString((parseIntValue(s[0]) + z)) + "_") + toString((parseIntValue(s[1]) + 1))) + "_") + s[2]) + "_") + s[3]) + "_") + toString((((parseIntValue(s[4]) + | |
63 | + | let sr3 = ((z / 100) * pr3) | |
64 | + | WriteSet([DataEntry("statistic", ((((((((((((((((toString((parseIntValue(s[0]) + z)) + "_") + toString((parseIntValue(s[1]) + 1))) + "_") + s[2]) + "_") + s[3]) + "_") + toString((((parseIntValue(s[4]) + sr1) + sr2) + sr3))) + "_") + toString((parseIntValue(s[5]) + 3))) + "_") + s[6]) + "_") + s[7]) + "_") + toString(((((parseIntValue(s[8]) + y) + sr1) + sr2) + sr3)))), DataEntry(a, ((((((((((((((((((((((toString((parseIntValue(u[0]) + z)) + "_") + toString((parseIntValue(u[1]) + x))) + "_") + toString((ud2 + x))) + "_") + toString(((ud2 + x) / f))) + "_") + toString(h)) + "_") + u[5]) + "_") + u[6]) + "_") + u[7]) + "_") + u[8]) + "_") + u[9]) + "_") + u[10]) + "_") + u[11])), DataEntry(u[7], ((((((((((((((((((((((r1[0] + "_") + r1[1]) + "_") + r1[2]) + "_") + r1[3]) + "_") + r1[4]) + "_") + r1[5]) + "_") + r1[6]) + "_") + r1[7]) + "_") + toString((parseIntValue(r1[8]) + sr1))) + "_") + r1[9]) + "_") + r1[10]) + "_") + toString((parseIntValue(r1[11]) + sr1)))), DataEntry(r1[7], ((((((((((((((((((((((r2[0] + "_") + r2[1]) + "_") + r2[2]) + "_") + r2[3]) + "_") + r2[4]) + "_") + r2[5]) + "_") + r2[6]) + "_") + r2[7]) + "_") + r2[8]) + "_") + toString((parseIntValue(r2[9]) + sr2))) + "_") + r2[10]) + "_") + toString((parseIntValue(r2[11]) + sr2)))), DataEntry(r2[7], ((((((((((((((((((((((r3[0] + "_") + r3[1]) + "_") + r3[2]) + "_") + r3[3]) + "_") + r3[4]) + "_") + r3[5]) + "_") + r3[6]) + "_") + r3[7]) + "_") + r3[8]) + "_") + r3[9]) + "_") + toString((parseIntValue(r3[10]) + sr3))) + "_") + toString((parseIntValue(r3[11]) + sr3))))]) | |
68 | 65 | } | |
69 | 66 | } | |
70 | 67 | } | |
71 | 68 | } | |
72 | 69 | } | |
73 | 70 | } | |
74 | 71 | ||
75 | 72 | ||
76 | 73 | ||
77 | 74 | @Callable(i) | |
78 | - | func withdraw ( | |
79 | - | let | |
80 | - | let | |
81 | - | let | |
82 | - | let | |
83 | - | let | |
84 | - | let | |
85 | - | let | |
86 | - | let | |
87 | - | let | |
88 | - | let | |
89 | - | then | |
90 | - | else (( | |
91 | - | if ((0 > | |
75 | + | func withdraw (y) = { | |
76 | + | let a = toBase58String(i.caller.bytes) | |
77 | + | let u = split(getUser(a), "_") | |
78 | + | let s = split(getStatistic(), "_") | |
79 | + | let h = lastBlock.height | |
80 | + | let j = parseIntValue(u[1]) | |
81 | + | let x = parseIntValue(u[2]) | |
82 | + | let d = parseIntValue(u[3]) | |
83 | + | let b = parseIntValue(u[11]) | |
84 | + | let g = (j + f) | |
85 | + | let m = if ((h >= g)) | |
86 | + | then (x + b) | |
87 | + | else ((d * ((f - g) - h)) + b) | |
88 | + | if ((0 > y)) | |
92 | 89 | then throw("Can't withdraw negative amount") | |
93 | - | else if (( | |
94 | - | then | |
95 | - | else if ((0 > | |
90 | + | else if ((b >= y)) | |
91 | + | then ScriptResult(WriteSet([DataEntry("statistic", ((((((((((((((((s[0] + "_") + s[1]) + "_") + s[2]) + "_") + toString((parseIntValue(s[3]) + 1))) + "_") + s[4]) + "_") + s[5]) + "_") + toString((parseIntValue(s[6]) + y))) + "_") + s[7]) + "_") + s[8])), DataEntry(a, ((((((((((((((((((((((u[0] + "_") + u[1]) + "_") + u[2]) + "_") + u[3]) + "_") + u[4]) + "_") + toString((parseIntValue(u[5]) + y))) + "_") + toString((parseIntValue(u[6]) + y))) + "_") + u[7]) + "_") + u[8]) + "_") + u[9]) + "_") + u[10]) + "_") + toString((parseIntValue(u[11]) - y))))]), TransferSet([ScriptTransfer(i.caller, y, unit)])) | |
92 | + | else if ((0 > (m - y))) | |
96 | 93 | then throw("Not enough balance") | |
97 | - | else ScriptResult(WriteSet([DataEntry("statistic", (((((((((statistic[0] + "_") + statistic[1]) + "_") + toString((parseIntValue(statistic[2]) + amount))) + "_") + toString((parseIntValue(statistic[1]) + 1))) + "_") + statistic[4]) + statistic[5])), DataEntry(currentKey, ((((((((((((((((((((((user[0] + "_") + user[1]) + "_") + toString(newAmount)) + "_") + user[3]) + "_") + toString(blockHeight)) + "_") + toString((parseIntValue(user[5]) + amount))) + "_") + toString((parseIntValue(user[6]) + amount))) + "_") + user[7]) + "_") + user[8]) + "_") + user[9]) + "_") + user[10]) + "_") + user[11]))]), TransferSet([ScriptTransfer(i.caller, amount, unit)])) | |
94 | + | else { | |
95 | + | let n = ((x + b) - y) | |
96 | + | ScriptResult(WriteSet([DataEntry("statistic", ((((((((((((((((s[0] + "_") + s[1]) + "_") + toString(((parseIntValue(s[2]) + y) - parseIntValue(u[11])))) + "_") + toString((parseIntValue(s[3]) + 1))) + "_") + s[4]) + "_") + s[5]) + "_") + toString((parseIntValue(s[6]) + parseIntValue(u[11])))) + "_") + s[7]) + "_") + s[8])), DataEntry(a, (((((((((((((((((((((u[0] + "_") + u[1]) + "_") + toString(n)) + "_") + u[3]) + "_") + u[4]) + "_") + toString((parseIntValue(u[5]) + y))) + "_") + toString((parseIntValue(u[6]) + y))) + "_") + u[7]) + "_") + u[8]) + "_") + u[9]) + "_") + u[10]) + "_0"))]), TransferSet([ScriptTransfer(i.caller, y, unit)])) | |
97 | + | } | |
98 | 98 | } | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | @Verifier(tx) | |
102 | 102 | func verify () = match tx { | |
103 | 103 | case d: SetScriptTransaction => | |
104 | 104 | sigVerify(tx.bodyBytes, tx.proofs[0], base58'33Gr5uEJMDMKdRs25QUDvTeQ7q5EpGcAdPztrFvQWdv9') | |
105 | 105 | case _ => | |
106 | 106 | true | |
107 | 107 | } | |
108 | 108 |
github/deemru/w8io/169f3d6 274.18 ms ◑