tx · 3EDoMavUgGSjtjUoh3YWjn6298Mjc6E92hgD6eR7RNL3

3MqEAEVk1NcbRAuEPAX7nyzUqMHbhvRofez:  -0.00800000 Waves

2023.11.08 12:20 [2834192] smart account 3MqEAEVk1NcbRAuEPAX7nyzUqMHbhvRofez > SELF 0.00000000 Waves

{ "type": 13, "id": "3EDoMavUgGSjtjUoh3YWjn6298Mjc6E92hgD6eR7RNL3", "fee": 800000, "feeAssetId": null, "timestamp": 1699435287373, "version": 2, "chainId": 84, "sender": "3MqEAEVk1NcbRAuEPAX7nyzUqMHbhvRofez", "senderPublicKey": "Brp6cacBXyKUcZr5Uc6VDKsnFcaEeQ8nQzrZQyobDsuf", "proofs": [ "4wYueUj3U2KXdeeuRK6NFk9DrooeoDphsFhWCJkHb1cfgNL4JxtVLLX1YBkTLS3VmqFq4c953L4T1JtRb7uuuMD" ], "script": "base64:BgIbCAISBAoCCAESAwoBCBIAEgMKAQgSABIDCgEICQACbGkJAMwIAgIBMQkAzAgCAgEyCQDMCAICATMJAMwIAgIBNAkAzAgCAgE1CQDMCAICATYJAMwIAgIBNwkAzAgCAgE4CQDMCAICATkJAMwIAgICMTAJAMwIAgICMTEJAMwIAgICMTIJAMwIAgICMTMJAMwIAgICMTQJAMwIAgICMTUJAMwIAgICMTYJAMwIAgICMTcJAMwIAgICMTgJAMwIAgICMTkJAMwIAgICMjAJAMwIAgICMjEJAMwIAgICMjIJAMwIAgICMjMJAMwIAgICMjQJAMwIAgICMjUJAMwIAgICMjYJAMwIAgICMjcJAMwIAgICMjgJAMwIAgICMjkJAMwIAgICMzAJAMwIAgICMzEJAMwIAgICMzIJAMwIAgICMzMJAMwIAgICMzQJAMwIAgICMzUJAMwIAgICMzYJAMwIAgICMzcJAMwIAgICMzgJAMwIAgICMzkJAMwIAgICNDAJAMwIAgICNDEJAMwIAgICNDIJAMwIAgICNDMJAMwIAgICNDQJAMwIAgICNDUJAMwIAgICNDYJAMwIAgICNDcJAMwIAgICNDgJAMwIAgICND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GFjYzAAAAABAAIAAwAEAAUABgAHAAgACQAKAAsADAANAA4ADwAQABEAEgATABQAFQAWABcAGAAZABoAGwAcAB0AHgAfACAAIQAiACMAJAAlACYAJwAoACkAKgArACwALQAuAC8AMAAxADIAMwA0ADUANgA3ADgDCQAAAgUDZW5kBQNlbmQJAMwIAgkBDEludGVnZXJFbnRyeQICBmhlaWdodAUGaGVpZ2h0BQNuaWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BaQEKZGVsZXRlRW50cgEGcG9vbElkCQDMCAIJAQtEZWxldGVFbnRyeQEJAKwCAgkArAICAgVwb29sXwUGcG9vbElkAgpfYm9vc3RpbmdzBQNuaWwADCUY9w==", "height": 2834192, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AG4uBoCjs4TNUi2No4zSUyZQKerKBRh1oJqUrV7fqZ8z Next: FWud1Dwk6YnPfNiqGFX9tvcMKtSVPK5br8CirJduDHXe Diff:
OldNewDifferences
5050 then {
5151 let blockReward = (tryGetInteger((("boosting_" + boostingId) + "_totalAmount")) / ((tryGetInteger((("boosting_" + boostingId) + "_days")) * hours) * minutes))
5252 let toPay = fraction((min([finishHeight, height]) - lastHeight), blockReward, 1)
53-[IntegerEntry((("boosting_" + boostingId) + "_lastHeight"), height), ScriptTransfer(addressFromStringValue(tryGetString((("boosting_" + boostingId) + "_poolId"))), toPay, getAssetBytes(tryGetString((("boosting_" + boostingId) + "_assetId")))), StringEntry("getFinishedPoolId", getFinishedPoolId), StringEntry("getPoolBoostings", getPoolBoostings), IntegerEntry("findIndex", findIndex), IntegerEntry("sizeStr", sizeStr)]
53+[IntegerEntry((("boosting_" + boostingId) + "_lastHeight"), height), ScriptTransfer(addressFromStringValue(tryGetString((("boosting_" + boostingId) + "_poolId"))), toPay, getAssetBytes(tryGetString((("boosting_" + boostingId) + "_assetId")))), StringEntry("getFinishedPoolId", getFinishedPoolId), StringEntry("getPoolBoostings", getPoolBoostings), IntegerEntry("findIndex", findIndex), IntegerEntry("sizeStr", sizeStr), StringEntry("left string", take(getPoolBoostings, (sizeStr - (sizeStr - findIndex)))), StringEntry("right string", takeRight(getPoolBoostings, (sizeStr - (findIndex + 1)))), StringEntry((("pool_" + getFinishedPoolId) + "_boostings"), removeEndedBoostingID)]
5454 }
5555 else nil
5656 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let li = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "55", "56"]
55
66 let hours = 1
77
88 let minutes = 10
99
1010 func tryGetInteger (key) = match getInteger(this, key) {
1111 case b: Int =>
1212 b
1313 case _ =>
1414 0
1515 }
1616
1717
1818 func tryGetString (key) = match getString(this, key) {
1919 case b: String =>
2020 b
2121 case _ =>
2222 ""
2323 }
2424
2525
2626 func getAssetString (assetId) = match assetId {
2727 case b: ByteVector =>
2828 toBase58String(b)
2929 case _ =>
3030 "WAVES"
3131 }
3232
3333
3434 func getAssetBytes (assetIdStr) = if ((assetIdStr == "WAVES"))
3535 then unit
3636 else fromBase58String(assetIdStr)
3737
3838
3939 func payBoostingResult (boostingId) = {
4040 let lastHeight = tryGetInteger((("boosting_" + boostingId) + "_lastHeight"))
4141 let finishHeight = tryGetInteger((("boosting_" + boostingId) + "_finishHeight"))
4242 let getFinishedPoolId = tryGetString((("boosting_" + boostingId) + "_poolId"))
4343 let getPoolBoostings = tryGetString((("pool_" + getFinishedPoolId) + "_boostings"))
4444 let sizeStr = size(getPoolBoostings)
4545 let findIndex = value(indexOf(getPoolBoostings, boostingId))
4646 let removeEndedBoostingID = (take(getPoolBoostings, (sizeStr - (sizeStr - findIndex))) + takeRight(getPoolBoostings, (sizeStr - (findIndex + 1))))
4747 if (if ((lastHeight != 0))
4848 then (finishHeight > lastHeight)
4949 else false)
5050 then {
5151 let blockReward = (tryGetInteger((("boosting_" + boostingId) + "_totalAmount")) / ((tryGetInteger((("boosting_" + boostingId) + "_days")) * hours) * minutes))
5252 let toPay = fraction((min([finishHeight, height]) - lastHeight), blockReward, 1)
53-[IntegerEntry((("boosting_" + boostingId) + "_lastHeight"), height), ScriptTransfer(addressFromStringValue(tryGetString((("boosting_" + boostingId) + "_poolId"))), toPay, getAssetBytes(tryGetString((("boosting_" + boostingId) + "_assetId")))), StringEntry("getFinishedPoolId", getFinishedPoolId), StringEntry("getPoolBoostings", getPoolBoostings), IntegerEntry("findIndex", findIndex), IntegerEntry("sizeStr", sizeStr)]
53+[IntegerEntry((("boosting_" + boostingId) + "_lastHeight"), height), ScriptTransfer(addressFromStringValue(tryGetString((("boosting_" + boostingId) + "_poolId"))), toPay, getAssetBytes(tryGetString((("boosting_" + boostingId) + "_assetId")))), StringEntry("getFinishedPoolId", getFinishedPoolId), StringEntry("getPoolBoostings", getPoolBoostings), IntegerEntry("findIndex", findIndex), IntegerEntry("sizeStr", sizeStr), StringEntry("left string", take(getPoolBoostings, (sizeStr - (sizeStr - findIndex)))), StringEntry("right string", takeRight(getPoolBoostings, (sizeStr - (findIndex + 1)))), StringEntry((("pool_" + getFinishedPoolId) + "_boostings"), removeEndedBoostingID)]
5454 }
5555 else nil
5656 }
5757
5858
5959 func endedBoostingIds (boostingId) = {
6060 let lastHeight = tryGetInteger((("boosting_" + boostingId) + "_lastHeight"))
6161 let finishHeight = tryGetInteger((("boosting_" + boostingId) + "_finishHeight"))
6262 if ((lastHeight >= finishHeight))
6363 then [StringEntry((("list ended " + toString(height)) + " boostingIds"), ((tryGetString((("list ended " + toString(height)) + " boostingIds")) + boostingId) + ","))]
6464 else [StringEntry((("list ongoing boosts " + toString(height)) + " boostingIds"), ((tryGetString((("list ongoing boosts " + toString(height)) + " boostingIds")) + boostingId) + ","))]
6565 }
6666
6767
6868 @Callable(i)
6969 func addBoosting (poolId,days) = if ((1 > days))
7070 then throw("amount of days has to be between 1 and 365")
7171 else if ((days > 365))
7272 then throw("amount of days has to be between 1 and 365")
7373 else if (false)
7474 then throw("under maintenance until further notice")
7575 else {
7676 let fullAmount = i.payments[0].amount
7777 if ((1440 > (fullAmount / days)))
7878 then throw((("boosting amount too small, minimum is " + toString((1440 * days))) + " of the smallest unit of payment asset"))
7979 else {
8080 let assetId = getAssetString(i.payments[0].assetId)
8181 if ((height == tryGetInteger("height")))
8282 then throw("wait 1 minute")
8383 else {
8484 let entry = if ((size(tryGetString((("pool_" + poolId) + "_boostings"))) > 11))
8585 then throw("max 5 boosts per pool")
8686 else invoke(this, "entryEnded", nil, nil)
8787 if ((entry == entry))
8888 then {
8989 let boostingId = if ((size((("list ongoing boosts " + toString(height)) + " boostingIds")) > 3))
9090 then throw("wait till other boosts are finished")
9191 else take(tryGetString((("list ended " + toString(height)) + " boostingIds")), 1)
9292 if ((addressFromString(poolId) == unit))
9393 then throw("incorrect pool address")
9494 else [IntegerEntry((("boosting_" + boostingId) + "_days"), days), IntegerEntry((("boosting_" + boostingId) + "_totalAmount"), fullAmount), IntegerEntry((("boosting_" + boostingId) + "_dailyAmount"), (fullAmount / days)), IntegerEntry((("boosting_" + boostingId) + "_startHeight"), height), IntegerEntry((("boosting_" + boostingId) + "_finishHeight"), (height + ((days * hours) * minutes))), IntegerEntry((("boosting_" + boostingId) + "_finishTimestamp"), (lastBlock.timestamp + ((((days * hours) * minutes) * 60) * 1000))), IntegerEntry((("boosting_" + boostingId) + "_lastHeight"), height), StringEntry((("boosting_" + boostingId) + "_assetId"), assetId), StringEntry((("boosting_" + boostingId) + "_owner"), toString(i.caller)), StringEntry((("boosting_" + boostingId) + "_poolId"), poolId), StringEntry((("pool_" + poolId) + "_boostings"), ((tryGetString((("pool_" + poolId) + "_boostings")) + boostingId) + ","))]
9595 }
9696 else throw("Strict value is not equal to itself.")
9797 }
9898 }
9999 }
100100
101101
102102
103103 @Callable(i)
104104 func payBoosting (boostingId) = payBoostingResult(boostingId)
105105
106106
107107
108108 @Callable(i)
109109 func payBoostings () = {
110110 func f (accum,next) = {
111111 let in = invoke(this, "payBoosting", [next], nil)
112112 if ((in == in))
113113 then in
114114 else throw("Strict value is not equal to itself.")
115115 }
116116
117117 let payments = {
118118 let $l = li
119119 let $s = size($l)
120120 let $acc0 = 0
121121 func $f0_1 ($a,$i) = if (($i >= $s))
122122 then $a
123123 else f($a, $l[$i])
124124
125125 func $f0_2 ($a,$i) = if (($i >= $s))
126126 then $a
127127 else throw("List size exceeds 56")
128128
129129 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56)
130130 }
131131 if ((payments == payments))
132132 then nil
133133 else throw("Strict value is not equal to itself.")
134134 }
135135
136136
137137
138138 @Callable(i)
139139 func endedBoostings (boostingId) = endedBoostingIds(boostingId)
140140
141141
142142
143143 @Callable(i)
144144 func entryEnded () = {
145145 func f (accum,next) = {
146146 let in = invoke(this, "endedBoostings", [next], nil)
147147 if ((in == in))
148148 then in
149149 else throw("Strict value is not equal to itself.")
150150 }
151151
152152 let end = {
153153 let $l = li
154154 let $s = size($l)
155155 let $acc0 = 0
156156 func $f0_1 ($a,$i) = if (($i >= $s))
157157 then $a
158158 else f($a, $l[$i])
159159
160160 func $f0_2 ($a,$i) = if (($i >= $s))
161161 then $a
162162 else throw("List size exceeds 56")
163163
164164 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56)
165165 }
166166 if ((end == end))
167167 then [IntegerEntry("height", height)]
168168 else throw("Strict value is not equal to itself.")
169169 }
170170
171171
172172
173173 @Callable(i)
174174 func deleteEntr (poolId) = [DeleteEntry((("pool_" + poolId) + "_boostings"))]
175175
176176

github/deemru/w8io/026f985 
53.58 ms