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