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:AAIDAAAAAAAAAAkIARIAEgMKAQEAAAAIAAAAAAJhcgIAAAAjM04yaEhhcUVFWGpGSEU1RzhOVHc2djdLTk13Y0hvYjJFbmEAAAAAAWYAAAAAAAAAAGQAAAAAAXAAAAAAAAAAABQAAAAAA3ByMQAAAAAAAAAAAwAAAAADcHIyAAAAAAAAAAACAAAAAANwcjMAAAAAAAAAAAEBAAAADGdldFN0YXRpc3RpYwAAAAAEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwIAAAAJc3RhdGlzdGljAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWECAAAAETBfMF8wXzBfMF8wXzBfMF8wAQAAAAdnZXRVc2VyAAAAAQAAAAR1c2VyBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAABHVzZXIDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQIAAAAXMF8wXzBfMF8wXzBfMF8wXzBfMF8wXzAAAAACAAAAAWk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AAAAgkAAZEAAAACBQAAAAF1AAAAAAAAAAAAAgAAAAFfCQABkQAAAAIFAAAAAXUAAAAAAAAAAAECAAAAAV8JAAGkAAAAAQUAAAABbgIAAAABXwkAAZEAAAACBQAAAAF1AAAAAAAAAAADAgAAAAFfCQABkQAAAAIFAAAAAXUAAAAAAAAAAAQCAAAAAV8JAAGkAAAAAQkAAGQAAAACCQEAAAANcGFyc2VJbnRWYWx1ZQAAAAEJAAGRAAAAAgUAAAABdQAAAAAAAAAABQUAAAABeQIAAAABXwkAAaQAAAABCQAAZAAAAAIJAQAAAA1wYXJzZUludFZhbHVlAAAAAQkAAZEAAAACBQAAAAF1AAAAAAAAAAAGBQAAAAF5AgAAAAFfCQABkQAAAAIFAAAAAXUAAAAAAAAAAAcCAAAAAV8JAAGRAAAAAgUAAAABdQAAAAAAAAAACAIAAAABXwkAAZEAAAACBQAAAAF1AAAAAAAAAAAJAgAAAAFfCQABkQAAAAIFAAAAAXUAAAAAAAAAAAoCAAAAAl8wBQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAF5BQAAAAR1bml0BQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAAWQFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAAAQAAACAeTHPyrMVhDL+ASaN/GWQaSDU3pEw0FPX+njJctvxBMgbk5pEo", "height": 1213306, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AJCPnr6Z4JB6Na1zWv6fiqeri876VTZjyArn7J5uDPMR Next: ALDjPAiGt8oRiX2Xj9K4jBK1iK94CeNnj414EScriSga Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let replenishmentAddress = "3N2hHaqEEXjFHE5G8NTw6v7KNMwcHob2Ena"
4+let ar = "3N2hHaqEEXjFHE5G8NTw6v7KNMwcHob2Ena"
55
6-let frostBlockCount = 100
6+let f = 100
77
8-let percent = 20
8+let p = 20
99
10-let percentRef1 = 3
10+let pr1 = 3
1111
12-let percentRef2 = 2
12+let pr2 = 2
1313
14-let percentRef3 = 1
14+let pr3 = 1
1515
1616 func getStatistic () = match getString(this, "statistic") {
1717 case a: String =>
3131
3232 @Callable(i)
3333 func deposit () = {
34- let pmt = extract(i.payment)
35- let z = pmt.amount
36- if (isDefined(pmt.assetId))
34+ let t = extract(i.payment)
35+ let z = t.amount
36+ if (isDefined(t.assetId))
3737 then throw("can hodl waves only at the moment")
3838 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]))])
4543 else {
46- let s = split(getStatistic(), "_")
4744 let h = lastBlock.height
48- let x = ((z / 100) * (100 + percent))
49- let a = (x - z)
50- let u = split(getUser(currentKey), "_")
45+ let x = ((z / 100) * (100 + p))
46+ let y = (x - z)
47+ let u = split(getUser(a), "_")
5148 let ud2 = parseIntValue(u[2])
5249 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]))])
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]))])
5451 else {
5552 let r1 = split(getUser(u[7]), "_")
56- let sumRef1 = ((z / 100) * percentRef1)
53+ let sr1 = ((z / 100) * pr1)
5754 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))))])
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))))])
5956 else {
6057 let r2 = split(getUser(r1[7]), "_")
61- let sumRef2 = ((z / 100) * percentRef2)
58+ let sr2 = ((z / 100) * pr2)
6259 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))))])
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))))])
6461 else {
6562 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))))])
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))))])
6865 }
6966 }
7067 }
7572
7673
7774 @Callable(i)
78-func withdraw (amount) = {
79- let currentKey = toBase58String(i.caller.bytes)
80- let user = split(getUser(currentKey), "_")
81- let statistic = split(getStatistic(), "_")
82- let oldAmount = parseIntValue(user[2])
83- let newAmount = (oldAmount - amount)
84- let blockHeight = lastBlock.height
85- let frostBlockHeight = parseIntValue(user[1])
86- let defrostBlockHeight = (frostBlockHeight + frostBlockCount)
87- let sumWithdraw = (parseIntValue(user[2]) + amount)
88- let maxWithdraw = if ((blockHeight >= defrostBlockHeight))
89- then oldAmount
90- else ((frostBlockCount - (defrostBlockHeight - blockHeight)) * (oldAmount / frostBlockCount))
91- if ((0 > amount))
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))
9289 then throw("Can't withdraw negative amount")
93- else if ((amount > maxWithdraw))
94- then throw(("Max sum: " + toString(maxWithdraw)))
95- else if ((0 > newAmount))
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)))
9693 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+ }
9898 }
9999
100100
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let replenishmentAddress = "3N2hHaqEEXjFHE5G8NTw6v7KNMwcHob2Ena"
4+let ar = "3N2hHaqEEXjFHE5G8NTw6v7KNMwcHob2Ena"
55
6-let frostBlockCount = 100
6+let f = 100
77
8-let percent = 20
8+let p = 20
99
10-let percentRef1 = 3
10+let pr1 = 3
1111
12-let percentRef2 = 2
12+let pr2 = 2
1313
14-let percentRef3 = 1
14+let pr3 = 1
1515
1616 func getStatistic () = match getString(this, "statistic") {
1717 case a: String =>
1818 a
1919 case _ =>
2020 "0_0_0_0_0_0_0_0_0"
2121 }
2222
2323
2424 func getUser (user) = match getString(this, user) {
2525 case a: String =>
2626 a
2727 case _ =>
2828 "0_0_0_0_0_0_0_0_0_0_0_0"
2929 }
3030
3131
3232 @Callable(i)
3333 func deposit () = {
34- let pmt = extract(i.payment)
35- let z = pmt.amount
36- if (isDefined(pmt.assetId))
34+ let t = extract(i.payment)
35+ let z = t.amount
36+ if (isDefined(t.assetId))
3737 then throw("can hodl waves only at the moment")
3838 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]))])
4543 else {
46- let s = split(getStatistic(), "_")
4744 let h = lastBlock.height
48- let x = ((z / 100) * (100 + percent))
49- let a = (x - z)
50- let u = split(getUser(currentKey), "_")
45+ let x = ((z / 100) * (100 + p))
46+ let y = (x - z)
47+ let u = split(getUser(a), "_")
5148 let ud2 = parseIntValue(u[2])
5249 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]))])
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]))])
5451 else {
5552 let r1 = split(getUser(u[7]), "_")
56- let sumRef1 = ((z / 100) * percentRef1)
53+ let sr1 = ((z / 100) * pr1)
5754 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))))])
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))))])
5956 else {
6057 let r2 = split(getUser(r1[7]), "_")
61- let sumRef2 = ((z / 100) * percentRef2)
58+ let sr2 = ((z / 100) * pr2)
6259 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))))])
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))))])
6461 else {
6562 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))))])
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))))])
6865 }
6966 }
7067 }
7168 }
7269 }
7370 }
7471
7572
7673
7774 @Callable(i)
78-func withdraw (amount) = {
79- let currentKey = toBase58String(i.caller.bytes)
80- let user = split(getUser(currentKey), "_")
81- let statistic = split(getStatistic(), "_")
82- let oldAmount = parseIntValue(user[2])
83- let newAmount = (oldAmount - amount)
84- let blockHeight = lastBlock.height
85- let frostBlockHeight = parseIntValue(user[1])
86- let defrostBlockHeight = (frostBlockHeight + frostBlockCount)
87- let sumWithdraw = (parseIntValue(user[2]) + amount)
88- let maxWithdraw = if ((blockHeight >= defrostBlockHeight))
89- then oldAmount
90- else ((frostBlockCount - (defrostBlockHeight - blockHeight)) * (oldAmount / frostBlockCount))
91- if ((0 > amount))
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))
9289 then throw("Can't withdraw negative amount")
93- else if ((amount > maxWithdraw))
94- then throw(("Max sum: " + toString(maxWithdraw)))
95- else if ((0 > newAmount))
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)))
9693 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+ }
9898 }
9999
100100
101101 @Verifier(tx)
102102 func verify () = match tx {
103103 case d: SetScriptTransaction =>
104104 sigVerify(tx.bodyBytes, tx.proofs[0], base58'33Gr5uEJMDMKdRs25QUDvTeQ7q5EpGcAdPztrFvQWdv9')
105105 case _ =>
106106 true
107107 }
108108

github/deemru/w8io/169f3d6 
274.18 ms