tx · 2sds4u3WhpPAqVkViygwzBFxMegH9G7zknoZ8DK1nzpn 3MqEAEVk1NcbRAuEPAX7nyzUqMHbhvRofez: -0.01200000 Waves 2023.11.01 12:22 [2824070] smart account 3MqEAEVk1NcbRAuEPAX7nyzUqMHbhvRofez > SELF 0.00000000 Waves
{ "type": 13, "id": "2sds4u3WhpPAqVkViygwzBFxMegH9G7zknoZ8DK1nzpn", "fee": 1200000, "feeAssetId": null, "timestamp": 1698830579171, "version": 2, "chainId": 84, "sender": "3MqEAEVk1NcbRAuEPAX7nyzUqMHbhvRofez", "senderPublicKey": "Brp6cacBXyKUcZr5Uc6VDKsnFcaEeQ8nQzrZQyobDsuf", "proofs": [ "271U8qznXnrj97M3yS5nKYRFD4LFT2k5tkcMBMr2AJAfiwyEv6BATMVdGbUMX41rJWZdkKzovWqABrw5jKdNnPco" ], "script": "base64:AAIFAAAAAAAAABgIAhIECgIIARIDCgEIEgASAwoBCBIAEgAAAAAJAAAAAAJsaQkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATIJAARMAAAAAgIAAAABMwkABEwAAAACAgAAAAE0CQAETAAAAAICAAAAATUJAARMAAAAAgIAAAABNgkABEwAAAACAgAAAAE3CQAETAAAAAICAAAAATgJAARMAAAAAgIAAAABOQkABEwAAAACAgAAAAIxMAkABEwAAAACAgAAAAIxMQkABEwAAAACAgAAAAIxMgkABEwAAAACAgAAAAIxMwkABEwAAAACAgAAAAIxNAkABEwAAAACAgAAAAIxNQkABEwAAAACAgAAAAIxNgkABEwAAAACAgAAAAIxNwkABEwAAAACAgAAAAIxOAkABEwAAAACAgAAAAIxOQkABEwAAAACAgAAAAIyMAkABEwAAAACAgAAAAIyMQkABEwAAAACAgAAAAIyMgkABEwAAAACAgAAAAIyMwkABEwAAAACAgAAAAIyNAkABEwAAAACAgAAAAIyNQkABEwAAAACAgAAAAIyNgkABEwAAAACAgAAAAIyNwkABEwAAAACAgAAAAIyOAkABEwAAAACAgAAAAIyOQkABEwAAAACAgAA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AADukIWO", "height": 2824070, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HDPiqkgCseAd7ufnAYvpbs2oy2nE5VTP3mvateh6Ekvo Next: Abx553A48RhWokDnYebkgZJYmo3BezxaS7ajyA5qbPp2 Diff:
Old | New | Differences | |
---|---|---|---|
44 | 44 | else false) | |
45 | 45 | then { | |
46 | 46 | let blockReward = (tryGetInteger((("boosting_" + boostingId) + "_totalAmount")) / ((tryGetInteger((("boosting_" + boostingId) + "_days")) * hours) * minutes)) | |
47 | - | let toPay = ((min([finishHeight, height]) - lastHeight) | |
47 | + | let toPay = fraction((min([finishHeight, height]) - lastHeight), blockReward, 1) | |
48 | 48 | [IntegerEntry((("boosting_" + boostingId) + "_lastHeight"), height), ScriptTransfer(addressFromStringValue(tryGetString((("boosting_" + boostingId) + "_poolId"))), toPay, getAssetBytes(tryGetString((("boosting_" + boostingId) + "_assetId"))))] | |
49 | 49 | } | |
50 | 50 | else nil | |
65 | 65 | then throw("amount of days has to be between 1 and 365") | |
66 | 66 | else if ((days > 365)) | |
67 | 67 | then throw("amount of days has to be between 1 and 365") | |
68 | - | else { | |
69 | - | let fullAmount = i.payments[0].amount | |
70 | - | if ((1440 > (fullAmount / days))) | |
71 | - | then throw((("boosting amount too small, minimum is " + toString((1440 * days))) + " of the smallest unit of payment asset")) | |
72 | - | else { | |
73 | - | let assetId = getAssetString(i.payments[0].assetId) | |
74 | - | if ((height == tryGetInteger("height"))) | |
75 | - | then throw("wait 1 minute") | |
76 | - | else { | |
77 | - | let entry = invoke(this, "entryEnded", nil, nil) | |
78 | - | if ((entry == entry)) | |
79 | - | then { | |
80 | - | let get = invoke(this, "firstEndedBoostingId", nil, nil) | |
81 | - | if ((get == get)) | |
82 | - | then { | |
83 | - | let boostingId = toString(tryGetInteger("first")) | |
84 | - | if ((addressFromString(poolId) == unit)) | |
85 | - | then throw("incorrect pool address") | |
86 | - | 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) + ","))] | |
87 | - | } | |
88 | - | else throw("Strict value is not equal to itself.") | |
89 | - | } | |
90 | - | else throw("Strict value is not equal to itself.") | |
91 | - | } | |
92 | - | } | |
93 | - | } | |
68 | + | else if (if ((i.caller != this)) | |
69 | + | then (i.caller != Address(base58'3P8qVX189qpoTJZQQQdKS9endHK5sxWsvrd')) | |
70 | + | else false) | |
71 | + | then throw("under maintenance until further notice") | |
72 | + | else { | |
73 | + | let fullAmount = i.payments[0].amount | |
74 | + | if ((1440 > (fullAmount / days))) | |
75 | + | then throw((("boosting amount too small, minimum is " + toString((1440 * days))) + " of the smallest unit of payment asset")) | |
76 | + | else { | |
77 | + | let assetId = getAssetString(i.payments[0].assetId) | |
78 | + | if ((height == tryGetInteger("height"))) | |
79 | + | then throw("wait 1 minute") | |
80 | + | else { | |
81 | + | let entry = invoke(this, "entryEnded", nil, nil) | |
82 | + | if ((entry == entry)) | |
83 | + | then { | |
84 | + | let get = invoke(this, "firstEndedBoostingId", nil, nil) | |
85 | + | if ((get == get)) | |
86 | + | then { | |
87 | + | let boostingId = toString(tryGetInteger("first")) | |
88 | + | if ((addressFromString(poolId) == unit)) | |
89 | + | then throw("incorrect pool address") | |
90 | + | 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) + ","))] | |
91 | + | } | |
92 | + | else throw("Strict value is not equal to itself.") | |
93 | + | } | |
94 | + | else throw("Strict value is not equal to itself.") | |
95 | + | } | |
96 | + | } | |
97 | + | } | |
94 | 98 | ||
95 | 99 | ||
96 | 100 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | 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"] | |
5 | 5 | ||
6 | 6 | let hours = 1 | |
7 | 7 | ||
8 | 8 | let minutes = 10 | |
9 | 9 | ||
10 | 10 | func tryGetInteger (key) = match getInteger(this, key) { | |
11 | 11 | case b: Int => | |
12 | 12 | b | |
13 | 13 | case _ => | |
14 | 14 | 0 | |
15 | 15 | } | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func tryGetString (key) = match getString(this, key) { | |
19 | 19 | case b: String => | |
20 | 20 | b | |
21 | 21 | case _ => | |
22 | 22 | "" | |
23 | 23 | } | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func getAssetString (assetId) = match assetId { | |
27 | 27 | case b: ByteVector => | |
28 | 28 | toBase58String(b) | |
29 | 29 | case _ => | |
30 | 30 | "WAVES" | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func getAssetBytes (assetIdStr) = if ((assetIdStr == "WAVES")) | |
35 | 35 | then unit | |
36 | 36 | else fromBase58String(assetIdStr) | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func payBoostingResult (boostingId) = { | |
40 | 40 | let lastHeight = tryGetInteger((("boosting_" + boostingId) + "_lastHeight")) | |
41 | 41 | let finishHeight = tryGetInteger((("boosting_" + boostingId) + "_finishHeight")) | |
42 | 42 | if (if ((lastHeight != 0)) | |
43 | 43 | then (finishHeight > lastHeight) | |
44 | 44 | else false) | |
45 | 45 | then { | |
46 | 46 | let blockReward = (tryGetInteger((("boosting_" + boostingId) + "_totalAmount")) / ((tryGetInteger((("boosting_" + boostingId) + "_days")) * hours) * minutes)) | |
47 | - | let toPay = ((min([finishHeight, height]) - lastHeight) | |
47 | + | let toPay = fraction((min([finishHeight, height]) - lastHeight), blockReward, 1) | |
48 | 48 | [IntegerEntry((("boosting_" + boostingId) + "_lastHeight"), height), ScriptTransfer(addressFromStringValue(tryGetString((("boosting_" + boostingId) + "_poolId"))), toPay, getAssetBytes(tryGetString((("boosting_" + boostingId) + "_assetId"))))] | |
49 | 49 | } | |
50 | 50 | else nil | |
51 | 51 | } | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func endedBoostingIds (boostingId) = { | |
55 | 55 | let lastHeight = tryGetInteger((("boosting_" + boostingId) + "_lastHeight")) | |
56 | 56 | let finishHeight = tryGetInteger((("boosting_" + boostingId) + "_finishHeight")) | |
57 | 57 | if ((lastHeight >= finishHeight)) | |
58 | 58 | then [StringEntry((("list ended " + toString(height)) + " boostingIds"), ((tryGetString((("list ended " + toString(height)) + " boostingIds")) + boostingId) + ","))] | |
59 | 59 | else nil | |
60 | 60 | } | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | @Callable(i) | |
64 | 64 | func addBoosting (poolId,days) = if ((1 > days)) | |
65 | 65 | then throw("amount of days has to be between 1 and 365") | |
66 | 66 | else if ((days > 365)) | |
67 | 67 | then throw("amount of days has to be between 1 and 365") | |
68 | - | else { | |
69 | - | let fullAmount = i.payments[0].amount | |
70 | - | if ((1440 > (fullAmount / days))) | |
71 | - | then throw((("boosting amount too small, minimum is " + toString((1440 * days))) + " of the smallest unit of payment asset")) | |
72 | - | else { | |
73 | - | let assetId = getAssetString(i.payments[0].assetId) | |
74 | - | if ((height == tryGetInteger("height"))) | |
75 | - | then throw("wait 1 minute") | |
76 | - | else { | |
77 | - | let entry = invoke(this, "entryEnded", nil, nil) | |
78 | - | if ((entry == entry)) | |
79 | - | then { | |
80 | - | let get = invoke(this, "firstEndedBoostingId", nil, nil) | |
81 | - | if ((get == get)) | |
82 | - | then { | |
83 | - | let boostingId = toString(tryGetInteger("first")) | |
84 | - | if ((addressFromString(poolId) == unit)) | |
85 | - | then throw("incorrect pool address") | |
86 | - | 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) + ","))] | |
87 | - | } | |
88 | - | else throw("Strict value is not equal to itself.") | |
89 | - | } | |
90 | - | else throw("Strict value is not equal to itself.") | |
91 | - | } | |
92 | - | } | |
93 | - | } | |
68 | + | else if (if ((i.caller != this)) | |
69 | + | then (i.caller != Address(base58'3P8qVX189qpoTJZQQQdKS9endHK5sxWsvrd')) | |
70 | + | else false) | |
71 | + | then throw("under maintenance until further notice") | |
72 | + | else { | |
73 | + | let fullAmount = i.payments[0].amount | |
74 | + | if ((1440 > (fullAmount / days))) | |
75 | + | then throw((("boosting amount too small, minimum is " + toString((1440 * days))) + " of the smallest unit of payment asset")) | |
76 | + | else { | |
77 | + | let assetId = getAssetString(i.payments[0].assetId) | |
78 | + | if ((height == tryGetInteger("height"))) | |
79 | + | then throw("wait 1 minute") | |
80 | + | else { | |
81 | + | let entry = invoke(this, "entryEnded", nil, nil) | |
82 | + | if ((entry == entry)) | |
83 | + | then { | |
84 | + | let get = invoke(this, "firstEndedBoostingId", nil, nil) | |
85 | + | if ((get == get)) | |
86 | + | then { | |
87 | + | let boostingId = toString(tryGetInteger("first")) | |
88 | + | if ((addressFromString(poolId) == unit)) | |
89 | + | then throw("incorrect pool address") | |
90 | + | 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) + ","))] | |
91 | + | } | |
92 | + | else throw("Strict value is not equal to itself.") | |
93 | + | } | |
94 | + | else throw("Strict value is not equal to itself.") | |
95 | + | } | |
96 | + | } | |
97 | + | } | |
94 | 98 | ||
95 | 99 | ||
96 | 100 | ||
97 | 101 | @Callable(i) | |
98 | 102 | func payBoosting (boostingId) = payBoostingResult(boostingId) | |
99 | 103 | ||
100 | 104 | ||
101 | 105 | ||
102 | 106 | @Callable(i) | |
103 | 107 | func payBoostings () = { | |
104 | 108 | func f (accum,next) = { | |
105 | 109 | let in = invoke(this, "payBoosting", [next], nil) | |
106 | 110 | if ((in == in)) | |
107 | 111 | then in | |
108 | 112 | else throw("Strict value is not equal to itself.") | |
109 | 113 | } | |
110 | 114 | ||
111 | 115 | let payments = { | |
112 | 116 | let $l = li | |
113 | 117 | let $s = size($l) | |
114 | 118 | let $acc0 = 0 | |
115 | 119 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
116 | 120 | then $a | |
117 | 121 | else f($a, $l[$i]) | |
118 | 122 | ||
119 | 123 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
120 | 124 | then $a | |
121 | 125 | else throw("List size exceeds 56") | |
122 | 126 | ||
123 | 127 | $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) | |
124 | 128 | } | |
125 | 129 | if ((payments == payments)) | |
126 | 130 | then nil | |
127 | 131 | else throw("Strict value is not equal to itself.") | |
128 | 132 | } | |
129 | 133 | ||
130 | 134 | ||
131 | 135 | ||
132 | 136 | @Callable(i) | |
133 | 137 | func endedBoostings (boostingId) = endedBoostingIds(boostingId) | |
134 | 138 | ||
135 | 139 | ||
136 | 140 | ||
137 | 141 | @Callable(i) | |
138 | 142 | func entryEnded () = { | |
139 | 143 | func f (accum,next) = { | |
140 | 144 | let in = invoke(this, "endedBoostings", [next], nil) | |
141 | 145 | if ((in == in)) | |
142 | 146 | then in | |
143 | 147 | else throw("Strict value is not equal to itself.") | |
144 | 148 | } | |
145 | 149 | ||
146 | 150 | let end = { | |
147 | 151 | let $l = li | |
148 | 152 | let $s = size($l) | |
149 | 153 | let $acc0 = 0 | |
150 | 154 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
151 | 155 | then $a | |
152 | 156 | else f($a, $l[$i]) | |
153 | 157 | ||
154 | 158 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
155 | 159 | then $a | |
156 | 160 | else throw("List size exceeds 56") | |
157 | 161 | ||
158 | 162 | $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) | |
159 | 163 | } | |
160 | 164 | if ((end == end)) | |
161 | 165 | then [IntegerEntry("height", height)] | |
162 | 166 | else throw("Strict value is not equal to itself.") | |
163 | 167 | } | |
164 | 168 | ||
165 | 169 | ||
166 | 170 | ||
167 | 171 | @Callable(i) | |
168 | 172 | func firstEndedBoostingId () = { | |
169 | 173 | func fold (accum,next) = (accum :+ parseIntValue(next)) | |
170 | 174 | ||
171 | 175 | let StringValue = dropRight(tryGetString((("list ended " + toString(height)) + " boostingIds")), 1) | |
172 | 176 | let list = { | |
173 | 177 | let $l = split(StringValue, ",") | |
174 | 178 | let $s = size($l) | |
175 | 179 | let $acc0 = nil | |
176 | 180 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
177 | 181 | then $a | |
178 | 182 | else fold($a, $l[$i]) | |
179 | 183 | ||
180 | 184 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
181 | 185 | then $a | |
182 | 186 | else throw("List size exceeds 56") | |
183 | 187 | ||
184 | 188 | $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) | |
185 | 189 | } | |
186 | 190 | let firstOfList = list[0] | |
187 | 191 | [IntegerEntry("first", firstOfList)] | |
188 | 192 | } | |
189 | 193 | ||
190 | 194 |
github/deemru/w8io/026f985 43.04 ms ◑