tx · FpMcHXZKes1tdv5PDmm3WTWjR1gUqfVCZYoVgmH6Y5DW 3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh: -0.01000000 Waves 2023.05.17 10:30 [2581655] smart account 3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh > SELF 0.00000000 Waves
{ "type": 13, "id": "FpMcHXZKes1tdv5PDmm3WTWjR1gUqfVCZYoVgmH6Y5DW", "fee": 1000000, "feeAssetId": null, "timestamp": 1684308612823, "version": 2, "chainId": 84, "sender": "3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh", "senderPublicKey": "EU9obW1yVhR8qug3EmXPeew3DMagvJFQzY5Ku8bmcsU7", "proofs": [ "5thfTcSanXEW1kYR3XgQUmQLhPXpChZnR3YeB9JCVGSoDLgGkdSnM7EguFPWzVtawuedhUHyBafdfQ9uU14az3sT" ], "script": "base64:BgIfCAISBwoFCAgIAQESABIDCgEBEgASAwoBARIECgIICBkACXNlcGFyYXRvcgICX18ADmtleUVwb2NoTGVuZ3RoCQC5CQIJAMwIAgICJXMJAMwIAgILZXBvY2hMZW5ndGgFA25pbAUJc2VwYXJhdG9yABNrZXlFbWlzc2lvbkNvbnRyYWN0CQC5CQIJAMwIAgICJXMJAMwIAgIQZW1pc3Npb25Db250cmFjdAUDbmlsBQlzZXBhcmF0b3IAE2tleUJvb3N0aW5nQ29udHJhY3QJALkJAgkAzAgCAgIlcwkAzAgCAhBib29zdGluZ0NvbnRyYWN0BQNuaWwFCXNlcGFyYXRvcgAMa2V5VGhyZXNob2xkCQC5CQIJAMwIAgICJXMJAMwIAgIPdm90aW5nVGhyZXNob2xkBQNuaWwFCXNlcGFyYXRvcgAPa2V5UmF0ZVBlckJsb2NrCQC5CQIJAMwIAgIEJXMlcwkAzAgCAgxyYXRlUGVyQmxvY2sJAMwIAgIHY3VycmVudAUDbmlsBQlzZXBhcmF0b3IAEmtleVJhdGVQZXJCbG9ja01heAkAuQkCCQDMCAICBCVzJXMJAMwIA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c3VmZmljaWVudCBoZWlnaHQgZm9yIGNvbXBsZXRpb24FA25pbAMJAAACBQZjaGVja3MFBmNoZWNrcwQMdm90aW5nUmVzdWx0CQC1CQIJAQV2YWx1ZQEJAKIIAQkBD2tleVZvdGluZ1Jlc3VsdAAFCXNlcGFyYXRvcgQPdm90ZXNUb0luY3JlYXNlCQENcGFyc2VJbnRWYWx1ZQEJAJEDAgUMdm90aW5nUmVzdWx0AAEEC3ZvdGVzVG9Ob25lCQENcGFyc2VJbnRWYWx1ZQEJAJEDAgUMdm90aW5nUmVzdWx0AAIED3ZvdGVzVG9EZWNyZWFzZQkBDXBhcnNlSW50VmFsdWUBCQCRAwIFDHZvdGluZ1Jlc3VsdAADBAhhbGxWb3RlcwkAZAIJAGQCBQ92b3Rlc1RvSW5jcmVhc2UFC3ZvdGVzVG9Ob25lBQ92b3Rlc1RvRGVjcmVhc2UECXRocmVzaG9sZAkBDGdldEludE9yRmFpbAEFDGtleVRocmVzaG9sZAQHYWN0aW9ucwMDCQBnAgUIYWxsVm90ZXMFCXRocmVzaG9sZAYHBQNuaWwFA25pbAUHYWN0aW9ucwkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgBpVPJ4", "height": 2581655, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 47nzm6AAKnKAJasEPmtWrWoz35E9SfLvbWT3s1Na8xmQ Next: Fp8MBeMkygTfLAMnFb1R2VC3nid6t4ryUgBSzUhm9uHq Diff:
Old | New | Differences | |
---|---|---|---|
8 | 8 | let keyEmissionContract = makeString(["%s", "emissionContract"], separator) | |
9 | 9 | ||
10 | 10 | let keyBoostingContract = makeString(["%s", "boostingContract"], separator) | |
11 | - | ||
12 | - | let keyFactoryContract = makeString(["%s", "factoryContract"], separator) | |
13 | 11 | ||
14 | 12 | let keyThreshold = makeString(["%s", "votingThreshold"], separator) | |
15 | 13 | ||
50 | 48 | let boostingContract = addressFromStringValue(getStringOrFail(keyBoostingContract)) | |
51 | 49 | ||
52 | 50 | let emissionContract = addressFromStringValue(getStringOrFail(keyEmissionContract)) | |
53 | - | ||
54 | - | let factoryContract = addressFromStringValue(getStringOrFail(keyFactoryContract)) | |
55 | 51 | ||
56 | 52 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
57 | 53 | ||
113 | 109 | ||
114 | 110 | @Callable(i) | |
115 | 111 | func constructor (boostingContractPrm,emissionContractPrm,factoryContractPrm,votingDurationPrm,threshold) = { | |
116 | - | let checks = [ | |
112 | + | let checks = [if (isDefined(addressFromString(boostingContractPrm))) | |
117 | 113 | then true | |
118 | 114 | else throw("Invalid boosting contract address"), if (isDefined(addressFromString(emissionContractPrm))) | |
119 | 115 | then true | |
120 | - | else throw("Invalid emission contract address"), if (isDefined(addressFromString(factoryContractPrm))) | |
121 | - | then true | |
122 | - | else throw("Invalid factory contract address"), if ((votingDurationPrm > 0)) | |
116 | + | else throw("Invalid emission contract address"), if ((votingDurationPrm > 0)) | |
123 | 117 | then true | |
124 | 118 | else throw("Invalid voting duration"), if ((threshold > 0)) | |
125 | 119 | then true | |
126 | 120 | else throw("invalid threshold")] | |
127 | 121 | if ((checks == checks)) | |
128 | - | then $Tuple2([StringEntry(keyBoostingContract, boostingContractPrm), StringEntry(keyEmissionContract, emissionContractPrm), | |
122 | + | then $Tuple2([StringEntry(keyBoostingContract, boostingContractPrm), StringEntry(keyEmissionContract, emissionContractPrm), IntegerEntry(keyEpochLength, votingDurationPrm), IntegerEntry(keyThreshold, threshold)], unit) | |
129 | 123 | else throw("Strict value is not equal to itself.") | |
130 | 124 | } | |
131 | 125 | ||
287 | 281 | let actions = if (if ((allVotes >= threshold)) | |
288 | 282 | then true | |
289 | 283 | else false) | |
290 | - | then { | |
291 | - | let res = invoke(factoryContract, "setWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil) | |
292 | - | if ((res == res)) | |
293 | - | then nil | |
294 | - | else throw("Strict value is not equal to itself.") | |
295 | - | } | |
284 | + | then nil | |
296 | 285 | else nil | |
297 | 286 | actions | |
298 | 287 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let separator = "__" | |
5 | 5 | ||
6 | 6 | let keyEpochLength = makeString(["%s", "epochLength"], separator) | |
7 | 7 | ||
8 | 8 | let keyEmissionContract = makeString(["%s", "emissionContract"], separator) | |
9 | 9 | ||
10 | 10 | let keyBoostingContract = makeString(["%s", "boostingContract"], separator) | |
11 | - | ||
12 | - | let keyFactoryContract = makeString(["%s", "factoryContract"], separator) | |
13 | 11 | ||
14 | 12 | let keyThreshold = makeString(["%s", "votingThreshold"], separator) | |
15 | 13 | ||
16 | 14 | let keyRatePerBlock = makeString(["%s%s", "ratePerBlock", "current"], separator) | |
17 | 15 | ||
18 | 16 | let keyRatePerBlockMax = makeString(["%s%s", "ratePerBlockMax", "current"], separator) | |
19 | 17 | ||
20 | 18 | let keyRateChangeStep = makeString(["%s", "rateChangeStep"], separator) | |
21 | 19 | ||
22 | 20 | func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (key + " is not defined")) | |
23 | 21 | ||
24 | 22 | ||
25 | 23 | func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), (key + " is not defined")) | |
26 | 24 | ||
27 | 25 | ||
28 | 26 | func keyStartHeight () = makeString(["%s", "startHeight"], separator) | |
29 | 27 | ||
30 | 28 | ||
31 | 29 | func keyVotingResult () = makeString(["%s", "votingResult"], separator) | |
32 | 30 | ||
33 | 31 | ||
34 | 32 | func totalVotes (totalIncrease,totalNone,totalDecrease) = makeString(["%d%d%d", totalIncrease, totalNone, totalDecrease], separator) | |
35 | 33 | ||
36 | 34 | ||
37 | 35 | func keyVote (voterAddress) = makeString(["%s%s", "vote", voterAddress], separator) | |
38 | 36 | ||
39 | 37 | ||
40 | 38 | func keyVoteValue (gwxAmount,vote) = { | |
41 | 39 | let key = if ((vote == 1)) | |
42 | 40 | then makeString(["%d%s", gwxAmount, "increase"], separator) | |
43 | 41 | else if ((vote == -1)) | |
44 | 42 | then makeString(["%d%s", gwxAmount, "decrease"], separator) | |
45 | 43 | else makeString(["%d%s", gwxAmount, "none"], separator) | |
46 | 44 | key | |
47 | 45 | } | |
48 | 46 | ||
49 | 47 | ||
50 | 48 | let boostingContract = addressFromStringValue(getStringOrFail(keyBoostingContract)) | |
51 | 49 | ||
52 | 50 | let emissionContract = addressFromStringValue(getStringOrFail(keyEmissionContract)) | |
53 | - | ||
54 | - | let factoryContract = addressFromStringValue(getStringOrFail(keyFactoryContract)) | |
55 | 51 | ||
56 | 52 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
57 | 53 | ||
58 | 54 | ||
59 | 55 | func keyManagerVaultAddress () = "%s__managerVaultAddress" | |
60 | 56 | ||
61 | 57 | ||
62 | 58 | func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) { | |
63 | 59 | case s: String => | |
64 | 60 | addressFromStringValue(s) | |
65 | 61 | case _ => | |
66 | 62 | this | |
67 | 63 | } | |
68 | 64 | ||
69 | 65 | ||
70 | 66 | func managerPublicKeyOrUnit () = { | |
71 | 67 | let managerVaultAddress = getManagerVaultAddressOrThis() | |
72 | 68 | match getString(managerVaultAddress, keyManagerPublicKey()) { | |
73 | 69 | case s: String => | |
74 | 70 | fromBase58String(s) | |
75 | 71 | case _: Unit => | |
76 | 72 | unit | |
77 | 73 | case _ => | |
78 | 74 | throw("Match error") | |
79 | 75 | } | |
80 | 76 | } | |
81 | 77 | ||
82 | 78 | ||
83 | 79 | func isManager (i) = match managerPublicKeyOrUnit() { | |
84 | 80 | case pk: ByteVector => | |
85 | 81 | (i.callerPublicKey == pk) | |
86 | 82 | case _: Unit => | |
87 | 83 | (i.caller == this) | |
88 | 84 | case _ => | |
89 | 85 | throw("Match error") | |
90 | 86 | } | |
91 | 87 | ||
92 | 88 | ||
93 | 89 | func mustManager (i) = if (isManager(i)) | |
94 | 90 | then true | |
95 | 91 | else throw("permission denied") | |
96 | 92 | ||
97 | 93 | ||
98 | 94 | func asInt (val) = match val { | |
99 | 95 | case valInt: Int => | |
100 | 96 | valInt | |
101 | 97 | case _ => | |
102 | 98 | throw("failed to cast into Integer") | |
103 | 99 | } | |
104 | 100 | ||
105 | 101 | ||
106 | 102 | func calcNewRate (ratePerBlockMax,ratePerBlock,changeStep) = { | |
107 | 103 | let maxAllowed = fraction(100, ratePerBlockMax, 120) | |
108 | 104 | let increasedRate = min([fraction((100 + changeStep), ratePerBlock, 100), maxAllowed]) | |
109 | 105 | let decreasedRate = max([fraction((100 - changeStep), ratePerBlock, 100), 0]) | |
110 | 106 | $Tuple3(increasedRate, ratePerBlock, decreasedRate) | |
111 | 107 | } | |
112 | 108 | ||
113 | 109 | ||
114 | 110 | @Callable(i) | |
115 | 111 | func constructor (boostingContractPrm,emissionContractPrm,factoryContractPrm,votingDurationPrm,threshold) = { | |
116 | - | let checks = [ | |
112 | + | let checks = [if (isDefined(addressFromString(boostingContractPrm))) | |
117 | 113 | then true | |
118 | 114 | else throw("Invalid boosting contract address"), if (isDefined(addressFromString(emissionContractPrm))) | |
119 | 115 | then true | |
120 | - | else throw("Invalid emission contract address"), if (isDefined(addressFromString(factoryContractPrm))) | |
121 | - | then true | |
122 | - | else throw("Invalid factory contract address"), if ((votingDurationPrm > 0)) | |
116 | + | else throw("Invalid emission contract address"), if ((votingDurationPrm > 0)) | |
123 | 117 | then true | |
124 | 118 | else throw("Invalid voting duration"), if ((threshold > 0)) | |
125 | 119 | then true | |
126 | 120 | else throw("invalid threshold")] | |
127 | 121 | if ((checks == checks)) | |
128 | - | then $Tuple2([StringEntry(keyBoostingContract, boostingContractPrm), StringEntry(keyEmissionContract, emissionContractPrm), | |
122 | + | then $Tuple2([StringEntry(keyBoostingContract, boostingContractPrm), StringEntry(keyEmissionContract, emissionContractPrm), IntegerEntry(keyEpochLength, votingDurationPrm), IntegerEntry(keyThreshold, threshold)], unit) | |
129 | 123 | else throw("Strict value is not equal to itself.") | |
130 | 124 | } | |
131 | 125 | ||
132 | 126 | ||
133 | 127 | ||
134 | 128 | @Callable(i) | |
135 | 129 | func getRateChangeAmountsREADONLY () = { | |
136 | 130 | let ratePerBlockMax = getIntegerValue(emissionContract, keyRatePerBlockMax) | |
137 | 131 | let ratePerBlock = getIntegerValue(emissionContract, keyRatePerBlock) | |
138 | 132 | let rateChangeStep = getIntegerValue(this, keyRateChangeStep) | |
139 | 133 | $Tuple2(nil, calcNewRate(ratePerBlockMax, ratePerBlock, rateChangeStep)) | |
140 | 134 | } | |
141 | 135 | ||
142 | 136 | ||
143 | 137 | ||
144 | 138 | @Callable(i) | |
145 | 139 | func vote (inFavor) = { | |
146 | 140 | let votingFinishHeight = (value(getInteger(keyStartHeight())) + value(getInteger(keyEpochLength))) | |
147 | 141 | let checks = [if ((votingFinishHeight > height)) | |
148 | 142 | then true | |
149 | 143 | else throw("too late to vote"), if (containsElement([1, 0, -1], inFavor)) | |
150 | 144 | then true | |
151 | 145 | else throw("not valid argument")] | |
152 | 146 | if ((checks == checks)) | |
153 | 147 | then { | |
154 | 148 | let gwxAmount = invoke(boostingContract, "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), votingFinishHeight], nil) | |
155 | 149 | let notZero = if ((asInt(gwxAmount) > 0)) | |
156 | 150 | then true | |
157 | 151 | else throw("you don't have gwx") | |
158 | 152 | if ((notZero == notZero)) | |
159 | 153 | then { | |
160 | 154 | let vote = match getString(keyVote(toString(i.caller))) { | |
161 | 155 | case s: String => | |
162 | 156 | let vote = split(s, separator) | |
163 | 157 | let voteValue = vote[1] | |
164 | 158 | let voteType = vote[2] | |
165 | 159 | let isVoteTypeSimilar = if (if (if ((voteType == "increase")) | |
166 | 160 | then (inFavor == 1) | |
167 | 161 | else false) | |
168 | 162 | then true | |
169 | 163 | else if ((voteType == "decrease")) | |
170 | 164 | then (inFavor == -1) | |
171 | 165 | else false) | |
172 | 166 | then true | |
173 | 167 | else if ((voteType == "none")) | |
174 | 168 | then (inFavor == 0) | |
175 | 169 | else false | |
176 | 170 | let isVoteValueSimilar = if (isVoteTypeSimilar) | |
177 | 171 | then (asInt(gwxAmount) == parseIntValue(voteValue)) | |
178 | 172 | else false | |
179 | 173 | let isNewVoteSimilar = if (if (isVoteTypeSimilar) | |
180 | 174 | then isVoteValueSimilar | |
181 | 175 | else false) | |
182 | 176 | then throw("you already voted") | |
183 | 177 | else invoke(this, "cancelVote", nil, nil) | |
184 | 178 | isNewVoteSimilar | |
185 | 179 | case u: Unit => | |
186 | 180 | u | |
187 | 181 | case _ => | |
188 | 182 | throw("Match error") | |
189 | 183 | } | |
190 | 184 | if ((vote == vote)) | |
191 | 185 | then { | |
192 | 186 | let votingResult = split(value(getString(keyVotingResult())), separator) | |
193 | 187 | let votesToIncrease = votingResult[1] | |
194 | 188 | let votesToNone = votingResult[2] | |
195 | 189 | let votesToDecrease = votingResult[3] | |
196 | 190 | let newPositiveAndNegativeVotes = if ((inFavor == 1)) | |
197 | 191 | then { | |
198 | 192 | let newPositiveVotes = (parseIntValue(votesToIncrease) + asInt(gwxAmount)) | |
199 | 193 | [toString(newPositiveVotes), votesToNone, votesToDecrease] | |
200 | 194 | } | |
201 | 195 | else if ((inFavor == -1)) | |
202 | 196 | then { | |
203 | 197 | let newNegativeVotes = (parseIntValue(votesToNone) + asInt(gwxAmount)) | |
204 | 198 | [votesToIncrease, votesToNone, toString(newNegativeVotes)] | |
205 | 199 | } | |
206 | 200 | else { | |
207 | 201 | let newNoneVotes = (parseIntValue(votesToNone) + asInt(gwxAmount)) | |
208 | 202 | [votesToIncrease, toString(newNoneVotes), votesToDecrease] | |
209 | 203 | } | |
210 | 204 | let voteKey = keyVote(toString(i.caller)) | |
211 | 205 | let voteValue = keyVoteValue(toString(asInt(gwxAmount)), inFavor) | |
212 | 206 | $Tuple2([StringEntry(keyVotingResult(), totalVotes(newPositiveAndNegativeVotes[0], newPositiveAndNegativeVotes[1], newPositiveAndNegativeVotes[2])), StringEntry(voteKey, voteValue)], unit) | |
213 | 207 | } | |
214 | 208 | else throw("Strict value is not equal to itself.") | |
215 | 209 | } | |
216 | 210 | else throw("Strict value is not equal to itself.") | |
217 | 211 | } | |
218 | 212 | else throw("Strict value is not equal to itself.") | |
219 | 213 | } | |
220 | 214 | ||
221 | 215 | ||
222 | 216 | ||
223 | 217 | @Callable(i) | |
224 | 218 | func cancelVote () = { | |
225 | 219 | let userAddress = if ((i.caller == this)) | |
226 | 220 | then toString(i.originCaller) | |
227 | 221 | else toString(i.caller) | |
228 | 222 | let checks = [if (isDefined(getString(keyVotingResult()))) | |
229 | 223 | then true | |
230 | 224 | else throw("no vote")] | |
231 | 225 | if ((checks == checks)) | |
232 | 226 | then { | |
233 | 227 | let vote = split(value(getString(keyVote(userAddress))), separator) | |
234 | 228 | let voteValue = vote[1] | |
235 | 229 | let voteType = vote[2] | |
236 | 230 | let votingResult = split(value(getString(keyVotingResult())), separator) | |
237 | 231 | let votesToIncrease = votingResult[1] | |
238 | 232 | let votesToNone = votingResult[2] | |
239 | 233 | let votesToDecrease = votingResult[3] | |
240 | 234 | let actions = if ((voteType == "increase")) | |
241 | 235 | then { | |
242 | 236 | let newIncreaseVotes = (parseIntValue(votesToIncrease) - parseIntValue(voteValue)) | |
243 | 237 | $Tuple2([StringEntry(keyVotingResult(), totalVotes(toString(newIncreaseVotes), votesToNone, votesToDecrease)), DeleteEntry(keyVote(userAddress))], unit) | |
244 | 238 | } | |
245 | 239 | else if ((voteType == "descrease")) | |
246 | 240 | then { | |
247 | 241 | let newDecreaseVotes = (parseIntValue(votesToDecrease) - parseIntValue(voteValue)) | |
248 | 242 | $Tuple2([StringEntry(keyVotingResult(), totalVotes(votesToIncrease, votesToNone, toString(newDecreaseVotes))), DeleteEntry(keyVote(userAddress))], unit) | |
249 | 243 | } | |
250 | 244 | else { | |
251 | 245 | let newNoneVotes = (parseIntValue(votesToNone) - parseIntValue(voteValue)) | |
252 | 246 | $Tuple2([StringEntry(keyVotingResult(), totalVotes(votesToIncrease, toString(newNoneVotes), votesToDecrease)), DeleteEntry(keyVote(userAddress))], unit) | |
253 | 247 | } | |
254 | 248 | actions | |
255 | 249 | } | |
256 | 250 | else throw("Strict value is not equal to itself.") | |
257 | 251 | } | |
258 | 252 | ||
259 | 253 | ||
260 | 254 | ||
261 | 255 | @Callable(i) | |
262 | 256 | func setThreshold (newThreshold) = { | |
263 | 257 | let checks = [mustManager(i), if ((newThreshold > 0)) | |
264 | 258 | then true | |
265 | 259 | else throw("invalid threshold")] | |
266 | 260 | if ((checks == checks)) | |
267 | 261 | then $Tuple2([IntegerEntry(keyThreshold, newThreshold)], unit) | |
268 | 262 | else throw("Strict value is not equal to itself.") | |
269 | 263 | } | |
270 | 264 | ||
271 | 265 | ||
272 | 266 | ||
273 | 267 | @Callable(i) | |
274 | 268 | func finalize (amountAssetId,priceAssetId) = { | |
275 | 269 | let votingFinishHeight = (value(getInteger(keyStartHeight())) + value(getInteger(keyEpochLength))) | |
276 | 270 | let checks = [if ((height >= votingFinishHeight)) | |
277 | 271 | then true | |
278 | 272 | else throw("insufficient height for completion")] | |
279 | 273 | if ((checks == checks)) | |
280 | 274 | then { | |
281 | 275 | let votingResult = split(value(getString(keyVotingResult())), separator) | |
282 | 276 | let votesToIncrease = parseIntValue(votingResult[1]) | |
283 | 277 | let votesToNone = parseIntValue(votingResult[2]) | |
284 | 278 | let votesToDecrease = parseIntValue(votingResult[3]) | |
285 | 279 | let allVotes = ((votesToIncrease + votesToNone) + votesToDecrease) | |
286 | 280 | let threshold = getIntOrFail(keyThreshold) | |
287 | 281 | let actions = if (if ((allVotes >= threshold)) | |
288 | 282 | then true | |
289 | 283 | else false) | |
290 | - | then { | |
291 | - | let res = invoke(factoryContract, "setWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil) | |
292 | - | if ((res == res)) | |
293 | - | then nil | |
294 | - | else throw("Strict value is not equal to itself.") | |
295 | - | } | |
284 | + | then nil | |
296 | 285 | else nil | |
297 | 286 | actions | |
298 | 287 | } | |
299 | 288 | else throw("Strict value is not equal to itself.") | |
300 | 289 | } | |
301 | 290 | ||
302 | 291 |
github/deemru/w8io/026f985 34.93 ms ◑