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:AAIDAAAAAAAAAAkIARIAEgMKAQEAAAAIAAAAABRyZXBsZW5pc2htZW50QWRkcmVzcwIAAAAjM04yaEhhcUVFWGpGSEU1RzhOVHc2djdLTk13Y0hvYjJFbmEAAAAAD2Zyb3N0QmxvY2tDb3VudAAAAAAAAAAAZAAAAAAHcGVyY2VudAAAAAAAAAAAFAAAAAALcGVyY2VudFJlZjEAAAAAAAAAAAMAAAAAC3BlcmNlbnRSZWYyAAAAAAAAAAACAAAAAAtwZXJjZW50UmVmMwAAAAAAAAAAAQEAAAAMZ2V0U3RhdGlzdGljAAAAAAQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzAgAAAAlzdGF0aXN0aWMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQIAAAARMF8wXzBfMF8wXzBfMF8wXzABAAAAB2dldFVzZXIAAAABAAAABHVzZXIEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAAEdXNlcgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW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kAAAAAQUAAAALYmxvY2tIZWlnaHQCAAAAAV8JAAGkAAAAAQkAAGQAAAACCQEAAAANcGFyc2VJbnRWYWx1ZQAAAAEJAAGRAAAAAgUAAAAEdXNlcgAAAAAAAAAABQUAAAAGYW1vdW50AgAAAAFfCQABpAAAAAEJAABkAAAAAgkBAAAADXBhcnNlSW50VmFsdWUAAAABCQABkQAAAAIFAAAABHVzZXIAAAAAAAAAAAYFAAAABmFtb3VudAIAAAABXwkAAZEAAAACBQAAAAR1c2VyAAAAAAAAAAAHAgAAAAFfCQABkQAAAAIFAAAABHVzZXIAAAAAAAAAAAgCAAAAAV8JAAGRAAAAAgUAAAAEdXNlcgAAAAAAAAAACQIAAAABXwkAAZEAAAACBQAAAAR1c2VyAAAAAAAAAAAKAgAAAAFfCQABkQAAAAIFAAAABHVzZXIAAAAAAAAAAAsFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAABmFtb3VudAUAAAAEdW5pdAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAAFkBQAAAAckbWF0Y2gwCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAEAAAAgHkxz8qzFYQy/gEmjfxlkGkg1N6RMNBT1/p4yXLb8QTIGQo+4Kw==", "height": 1212902, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CdYvmGNLmw324k1EdmdUj4hEoMpQczVDLYuNyoKuBy15 Next: BK3adjmCZRo7muTam5XHzKW7gqEoydxjKaudwE94yZrt Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let replenishmentAddress = "3N2hHaqEEXjFHE5G8NTw6v7KNMwcHob2Ena"
5+
46 let frostBlockCount = 100
57
68 let percent = 20
1517 case a: String =>
1618 a
1719 case _ =>
18- "0_0_0_0_0_0_0"
20+ "0_0_0_0_0_0_0_0_0"
1921 }
2022
2123
3032 @Callable(i)
3133 func deposit () = {
3234 let pmt = extract(i.payment)
35+ let z = pmt.amount
3336 if (isDefined(pmt.assetId))
3437 then throw("can hodl waves only at the moment")
3538 else {
3639 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+ }
3945 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]))])
4754 else {
48- let ref1 = split(getUser(user[7]), "_")
49- let sumRef1 = ((pmt.amount / 100) * percentRef1)
50- if ((ref1[7] == "0"))
51- then WriteSet([DataEntry("statistic", ((((((((((((toString((parseIntValue(statistic[0]) + pmt.amount)) + "_") + toString((parseIntValue(statistic[1]) + 1))) + "_") + statistic[2]) + "_") + statistic[3]) + "_") + toString((parseIntValue(statistic[4]) + sumRef1))) + "_") + toString((parseIntValue(statistic[5]) + 1))) + "_") + 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])), DataEntry(currentKey, ((((((((((((((((((((((ref1[0] + "_") + ref1[1]) + "_") + ref1[2]) + "_") + ref1[3]) + "_") + ref1[4]) + "_") + ref1[5]) + "_") + ref1[6]) + "_") + ref1[7]) + "_") + toString((parseIntValue(ref1[8]) + sumRef1))) + "_") + ref1[9]) + "_") + ref1[10]) + "_") + toString((parseIntValue(ref1[11]) + sumRef1))))])
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))))])
5259 else {
53- let ref2 = split(getUser(ref1[7]), "_")
54- let sumRef2 = ((pmt.amount / 100) * percentRef2)
55- if ((ref2[7] == "0"))
56- then WriteSet([DataEntry("statistic", ((((((((((((toString((parseIntValue(statistic[0]) + pmt.amount)) + "_") + toString((parseIntValue(statistic[1]) + 1))) + "_") + statistic[2]) + "_") + statistic[3]) + "_") + toString(((parseIntValue(statistic[4]) + sumRef1) + sumRef2))) + "_") + toString((parseIntValue(statistic[5]) + 2))) + "_") + 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])), DataEntry(currentKey, ((((((((((((((((((((((ref1[0] + "_") + ref1[1]) + "_") + ref1[2]) + "_") + ref1[3]) + "_") + ref1[4]) + "_") + ref1[5]) + "_") + ref1[6]) + "_") + ref1[7]) + "_") + toString((parseIntValue(ref1[8]) + sumRef1))) + "_") + ref1[9]) + "_") + ref1[10]) + "_") + toString((parseIntValue(ref1[11]) + sumRef1)))), DataEntry(currentKey, ((((((((((((((((((((((ref2[0] + "_") + ref2[1]) + "_") + ref2[2]) + "_") + ref2[3]) + "_") + ref2[4]) + "_") + ref2[5]) + "_") + ref2[6]) + "_") + ref2[7]) + "_") + ref2[8]) + "_") + toString((parseIntValue(ref2[9]) + sumRef2))) + "_") + ref2[10]) + "_") + toString((parseIntValue(ref2[11]) + sumRef2))))])
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))))])
5764 else {
58- let ref3 = split(getUser(ref2[7]), "_")
59- let sumRef3 = ((pmt.amount / 100) * percentRef3)
60- WriteSet([DataEntry("statistic", ((((((((((((toString((parseIntValue(statistic[0]) + pmt.amount)) + "_") + toString((parseIntValue(statistic[1]) + 1))) + "_") + statistic[2]) + "_") + statistic[3]) + "_") + toString((((parseIntValue(statistic[4]) + sumRef1) + sumRef2) + sumRef3))) + "_") + toString((parseIntValue(statistic[5]) + 3))) + "_") + 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])), DataEntry(currentKey, ((((((((((((((((((((((ref1[0] + "_") + ref1[1]) + "_") + ref1[2]) + "_") + ref1[3]) + "_") + ref1[4]) + "_") + ref1[5]) + "_") + ref1[6]) + "_") + ref1[7]) + "_") + toString((parseIntValue(ref1[8]) + sumRef1))) + "_") + ref1[9]) + "_") + ref1[10]) + "_") + toString((parseIntValue(ref1[11]) + sumRef1)))), DataEntry(currentKey, ((((((((((((((((((((((ref2[0] + "_") + ref2[1]) + "_") + ref2[2]) + "_") + ref2[3]) + "_") + ref2[4]) + "_") + ref2[5]) + "_") + ref2[6]) + "_") + ref2[7]) + "_") + ref2[8]) + "_") + toString((parseIntValue(ref2[9]) + sumRef2))) + "_") + ref2[10]) + "_") + toString((parseIntValue(ref2[11]) + sumRef2)))), DataEntry(currentKey, ((((((((((((((((((((((ref3[0] + "_") + ref3[1]) + "_") + ref3[2]) + "_") + ref3[3]) + "_") + ref3[4]) + "_") + ref3[5]) + "_") + ref3[6]) + "_") + ref3[7]) + "_") + ref3[8]) + "_") + ref3[9]) + "_") + toString((parseIntValue(ref3[10]) + sumRef3))) + "_") + toString((parseIntValue(ref3[11]) + sumRef3))))])
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))))])
6168 }
6269 }
6370 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let replenishmentAddress = "3N2hHaqEEXjFHE5G8NTw6v7KNMwcHob2Ena"
5+
46 let frostBlockCount = 100
57
68 let percent = 20
79
810 let percentRef1 = 3
911
1012 let percentRef2 = 2
1113
1214 let percentRef3 = 1
1315
1416 func getStatistic () = match getString(this, "statistic") {
1517 case a: String =>
1618 a
1719 case _ =>
18- "0_0_0_0_0_0_0"
20+ "0_0_0_0_0_0_0_0_0"
1921 }
2022
2123
2224 func getUser (user) = match getString(this, user) {
2325 case a: String =>
2426 a
2527 case _ =>
2628 "0_0_0_0_0_0_0_0_0_0_0_0"
2729 }
2830
2931
3032 @Callable(i)
3133 func deposit () = {
3234 let pmt = extract(i.payment)
35+ let z = pmt.amount
3336 if (isDefined(pmt.assetId))
3437 then throw("can hodl waves only at the moment")
3538 else {
3639 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+ }
3945 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]))])
4754 else {
48- let ref1 = split(getUser(user[7]), "_")
49- let sumRef1 = ((pmt.amount / 100) * percentRef1)
50- if ((ref1[7] == "0"))
51- then WriteSet([DataEntry("statistic", ((((((((((((toString((parseIntValue(statistic[0]) + pmt.amount)) + "_") + toString((parseIntValue(statistic[1]) + 1))) + "_") + statistic[2]) + "_") + statistic[3]) + "_") + toString((parseIntValue(statistic[4]) + sumRef1))) + "_") + toString((parseIntValue(statistic[5]) + 1))) + "_") + 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])), DataEntry(currentKey, ((((((((((((((((((((((ref1[0] + "_") + ref1[1]) + "_") + ref1[2]) + "_") + ref1[3]) + "_") + ref1[4]) + "_") + ref1[5]) + "_") + ref1[6]) + "_") + ref1[7]) + "_") + toString((parseIntValue(ref1[8]) + sumRef1))) + "_") + ref1[9]) + "_") + ref1[10]) + "_") + toString((parseIntValue(ref1[11]) + sumRef1))))])
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))))])
5259 else {
53- let ref2 = split(getUser(ref1[7]), "_")
54- let sumRef2 = ((pmt.amount / 100) * percentRef2)
55- if ((ref2[7] == "0"))
56- then WriteSet([DataEntry("statistic", ((((((((((((toString((parseIntValue(statistic[0]) + pmt.amount)) + "_") + toString((parseIntValue(statistic[1]) + 1))) + "_") + statistic[2]) + "_") + statistic[3]) + "_") + toString(((parseIntValue(statistic[4]) + sumRef1) + sumRef2))) + "_") + toString((parseIntValue(statistic[5]) + 2))) + "_") + 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])), DataEntry(currentKey, ((((((((((((((((((((((ref1[0] + "_") + ref1[1]) + "_") + ref1[2]) + "_") + ref1[3]) + "_") + ref1[4]) + "_") + ref1[5]) + "_") + ref1[6]) + "_") + ref1[7]) + "_") + toString((parseIntValue(ref1[8]) + sumRef1))) + "_") + ref1[9]) + "_") + ref1[10]) + "_") + toString((parseIntValue(ref1[11]) + sumRef1)))), DataEntry(currentKey, ((((((((((((((((((((((ref2[0] + "_") + ref2[1]) + "_") + ref2[2]) + "_") + ref2[3]) + "_") + ref2[4]) + "_") + ref2[5]) + "_") + ref2[6]) + "_") + ref2[7]) + "_") + ref2[8]) + "_") + toString((parseIntValue(ref2[9]) + sumRef2))) + "_") + ref2[10]) + "_") + toString((parseIntValue(ref2[11]) + sumRef2))))])
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))))])
5764 else {
58- let ref3 = split(getUser(ref2[7]), "_")
59- let sumRef3 = ((pmt.amount / 100) * percentRef3)
60- WriteSet([DataEntry("statistic", ((((((((((((toString((parseIntValue(statistic[0]) + pmt.amount)) + "_") + toString((parseIntValue(statistic[1]) + 1))) + "_") + statistic[2]) + "_") + statistic[3]) + "_") + toString((((parseIntValue(statistic[4]) + sumRef1) + sumRef2) + sumRef3))) + "_") + toString((parseIntValue(statistic[5]) + 3))) + "_") + 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])), DataEntry(currentKey, ((((((((((((((((((((((ref1[0] + "_") + ref1[1]) + "_") + ref1[2]) + "_") + ref1[3]) + "_") + ref1[4]) + "_") + ref1[5]) + "_") + ref1[6]) + "_") + ref1[7]) + "_") + toString((parseIntValue(ref1[8]) + sumRef1))) + "_") + ref1[9]) + "_") + ref1[10]) + "_") + toString((parseIntValue(ref1[11]) + sumRef1)))), DataEntry(currentKey, ((((((((((((((((((((((ref2[0] + "_") + ref2[1]) + "_") + ref2[2]) + "_") + ref2[3]) + "_") + ref2[4]) + "_") + ref2[5]) + "_") + ref2[6]) + "_") + ref2[7]) + "_") + ref2[8]) + "_") + toString((parseIntValue(ref2[9]) + sumRef2))) + "_") + ref2[10]) + "_") + toString((parseIntValue(ref2[11]) + sumRef2)))), DataEntry(currentKey, ((((((((((((((((((((((ref3[0] + "_") + ref3[1]) + "_") + ref3[2]) + "_") + ref3[3]) + "_") + ref3[4]) + "_") + ref3[5]) + "_") + ref3[6]) + "_") + ref3[7]) + "_") + ref3[8]) + "_") + ref3[9]) + "_") + toString((parseIntValue(ref3[10]) + sumRef3))) + "_") + toString((parseIntValue(ref3[11]) + sumRef3))))])
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))))])
6168 }
6269 }
6370 }
6471 }
6572 }
6673 }
6774
6875
6976
7077 @Callable(i)
7178 func withdraw (amount) = {
7279 let currentKey = toBase58String(i.caller.bytes)
7380 let user = split(getUser(currentKey), "_")
7481 let statistic = split(getStatistic(), "_")
7582 let oldAmount = parseIntValue(user[2])
7683 let newAmount = (oldAmount - amount)
7784 let blockHeight = lastBlock.height
7885 let frostBlockHeight = parseIntValue(user[1])
7986 let defrostBlockHeight = (frostBlockHeight + frostBlockCount)
8087 let sumWithdraw = (parseIntValue(user[2]) + amount)
8188 let maxWithdraw = if ((blockHeight >= defrostBlockHeight))
8289 then oldAmount
8390 else ((frostBlockCount - (defrostBlockHeight - blockHeight)) * (oldAmount / frostBlockCount))
8491 if ((0 > amount))
8592 then throw("Can't withdraw negative amount")
8693 else if ((amount > maxWithdraw))
8794 then throw(("Max sum: " + toString(maxWithdraw)))
8895 else if ((0 > newAmount))
8996 then throw("Not enough balance")
9097 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)]))
9198 }
9299
93100
94101 @Verifier(tx)
95102 func verify () = match tx {
96103 case d: SetScriptTransaction =>
97104 sigVerify(tx.bodyBytes, tx.proofs[0], base58'33Gr5uEJMDMKdRs25QUDvTeQ7q5EpGcAdPztrFvQWdv9')
98105 case _ =>
99106 true
100107 }
101108

github/deemru/w8io/169f3d6 
382.74 ms