tx · 1of4yUy32vj2uF1W1c9TYibjugi2ej7kEoLR1FztSX4 3MsRaoXR3k8nMQxY3LdHU3WErVbHxcwmVNh: -0.05000000 Waves 2023.10.06 14:41 [2786711] smart account 3MsRaoXR3k8nMQxY3LdHU3WErVbHxcwmVNh > SELF 0.00000000 Waves
{ "type": 13, "id": "1of4yUy32vj2uF1W1c9TYibjugi2ej7kEoLR1FztSX4", "fee": 5000000, "feeAssetId": null, "timestamp": 1696592474529, "version": 1, "sender": "3MsRaoXR3k8nMQxY3LdHU3WErVbHxcwmVNh", "senderPublicKey": "8E7e8T1omtzwnJZeQMopzMvUXPY2EpXTF2bWoxszupzg", "proofs": [ "3Z5ztY86vDVtM5iir24zNNDnzjuj5BgzTGacUpkPhv4KGH9zHR2jDMbHGnVMGC69vxaqCdrRVXJ24oxVgUU67zCc" ], "script": "base64:BgJjCAISDAoKCAEBAQEBAQgICBIECgIIARIECgIICBIECgIICBIDCgEIEgMKAQgSBQoDCAEBEgMKAQgSBAoCCAESAwoBCBIDCgEIEgMKAQgSBAoCCAgSBAoCCAgSAwoBCBIDCgEIMwEQd3JpdGVDb25zdFN0cmluZwIDa2V5BXZhbHVlAwkBASEBCQEJaXNEZWZpbmVkAQkAnQgCBQR0aGlzBQNrZXkJAQtTdHJpbmdFbnRyeQIFA2tleQUFdmFsdWUJAAIBCQCsAgICFWFscmVhZHkgaW5pdGlhbGl6ZWQ6IAUDa2V5AQh3cml0ZUludAIDa2V5BXZhbHVlAwkAZgIAAAUFdmFsdWUJAAIBCQCsAgIJAKwCAgkArAICAhd3cml0aW5nIG5lZ2F0aXZlIHZhbHVlIAkApAMBBQV2YWx1ZQIJIGZvciBrZXkgBQNrZXkJAQxJbnRlZ2VyRW50cnkCBQNrZXkFBXZhbHVlAQhjaGFuZ2VCeQIDa2V5BXZhbHVlCQEId3JpdGVJbnQCBQNrZXkJAGQCCQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFA2tleQAABQV2YWx1ZQEFYXNJbn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AgCCQELRGVsZXRlRW50cnkBBQ51c2VyU2tpblN0b3JlMQkAzAgCCQEIY2hhbmdlQnkCCQEOc2tpblRvdGFsU3RvcmUBBQVjaGlsZAkBAS0BBQRza2luCQDMCAIJAQhjaGFuZ2VCeQIFDXB3clRvdGFsU3RvcmUJAQEtAQUEc2tpbgkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjYWxsZXIFBHNraW4FCnB3ckFzc2V0SWQFA25pbAUEc2tpbgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgFpAQl1c2VyUG93ZXICBWNoaWxkBHVzZXIJAJQKAgUDbmlsCQELdmFsdWVPckVsc2UCCQEOdXNlckNvbW1pdG1lbnQCBQVjaGlsZAUEdXNlcgAAAWkBCnRvdGFsUG93ZXIBBWNoaWxkCQCUCgIFA25pbAkBE3ZhbHVlT3JFcnJvck1lc3NhZ2UCCQCfCAEJAQ5za2luVG90YWxTdG9yZQEFBWNoaWxkAht0b3RhbFBvd2VyOiBjaGlsZCBub3QgZm91bmQBaQEEaW5pdAEEY29uZgkAzAgCCQEQd3JpdGVDb25zdFN0cmluZwIFEmNvbmZpZ0FkZHJlc3NTdG9yZQUEY29uZgUDbmlsAHKlyJo=", "chainId": 84, "height": 2786711, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | func writeConstString (key,value) = if (!(isDefined(getString(this, key)))) | |
5 | + | then StringEntry(key, value) | |
6 | + | else throw(("already initialized: " + key)) | |
7 | + | ||
8 | + | ||
9 | + | func writeInt (key,value) = if ((0 > value)) | |
10 | + | then throw(((("writing negative value " + toString(value)) + " for key ") + key)) | |
11 | + | else IntegerEntry(key, value) | |
12 | + | ||
13 | + | ||
14 | + | func changeBy (key,value) = writeInt(key, (valueOrElse(getInteger(this, key), 0) + value)) | |
15 | + | ||
16 | + | ||
17 | + | func asInt (value) = match value { | |
18 | + | case int: Int => | |
19 | + | int | |
20 | + | case _ => | |
21 | + | throw("wrong type, expected: Int") | |
22 | + | } | |
23 | + | ||
24 | + | ||
25 | + | func assetId (str) = if ((str == "WAVES")) | |
26 | + | then unit | |
27 | + | else fromBase58String(str) | |
28 | + | ||
29 | + | ||
30 | + | let configAddressStore = "config" | |
31 | + | ||
32 | + | let configAddress = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(this, configAddressStore), "children: config address not found")), "invalid config address") | |
33 | + | ||
34 | + | func allowed (op) = invoke(configAddress, "opAllowed", [op], nil) | |
35 | + | ||
36 | + | ||
37 | + | let HEIGHT = height | |
38 | + | ||
39 | + | let pwrAssetId = fromBase58String(valueOrErrorMessage(getString(configAddress, "powerAssetId"), "pwr asset id not found")) | |
40 | + | ||
41 | + | let slashers = valueOrElse(getString(configAddress, (toString(this) + "_slashers")), "") | |
42 | + | ||
43 | + | let mainAddresses = valueOrElse(getString(configAddress, "main_addresses"), "") | |
44 | + | ||
45 | + | func periodStore (child) = ("period_" + child) | |
46 | + | ||
47 | + | ||
48 | + | func period (child) = valueOrElse(getInteger(periodStore(child)), 0) | |
49 | + | ||
50 | + | ||
51 | + | func ownerStore (child) = ("owner_" + child) | |
52 | + | ||
53 | + | ||
54 | + | func treasuryStore (child) = ("treasury_" + child) | |
55 | + | ||
56 | + | ||
57 | + | func lockTimeStore (child) = ("lockTime_" + child) | |
58 | + | ||
59 | + | ||
60 | + | func periodLockTimeStore (child,period) = ((("period_" + toString(period)) + "_lockTime_") + child) | |
61 | + | ||
62 | + | ||
63 | + | func skinRequiredStore (child) = ("skin_required_" + child) | |
64 | + | ||
65 | + | ||
66 | + | func skinMaxStore (child) = ("skin_max_" + child) | |
67 | + | ||
68 | + | ||
69 | + | func investmentsMaxStore (child) = ("investments_max_" + child) | |
70 | + | ||
71 | + | ||
72 | + | func minCommitmentStore (child) = ("min_commitment" + child) | |
73 | + | ||
74 | + | ||
75 | + | func skinTotalStore (child) = ("skin_total_" + child) | |
76 | + | ||
77 | + | ||
78 | + | let pwrTotalStore = "pwr_total" | |
79 | + | ||
80 | + | func investmentsRequiredStore (child) = ("investments_required_" + child) | |
81 | + | ||
82 | + | ||
83 | + | func investmentsTotalStore (child) = ("investments_total_" + child) | |
84 | + | ||
85 | + | ||
86 | + | func investmentsPeriodTotalStore (child) = ((("period_" + toString(period(child))) + "_investments_total_") + child) | |
87 | + | ||
88 | + | ||
89 | + | func investmentsTokenStore (child) = ("investments_token_" + child) | |
90 | + | ||
91 | + | ||
92 | + | func commitmentsStore (child) = ("commitments_" + child) | |
93 | + | ||
94 | + | ||
95 | + | func createHeightStore (child) = ("create_height_" + child) | |
96 | + | ||
97 | + | ||
98 | + | func startHeightStore (child) = ("start_height_" + child) | |
99 | + | ||
100 | + | ||
101 | + | func startPeriodHeightStore (child,period) = ((("period_" + toString(period)) + "_start_height_") + child) | |
102 | + | ||
103 | + | ||
104 | + | func startPeriodAfterHeightStore (child,period) = ((("period_" + toString(period)) + "_start_after_height_") + child) | |
105 | + | ||
106 | + | ||
107 | + | func startCurrentPeriodHeightStore (child) = startPeriodHeightStore(child, period(child)) | |
108 | + | ||
109 | + | ||
110 | + | func cancelHeightStore (child) = ("cancel_height_" + child) | |
111 | + | ||
112 | + | ||
113 | + | func investmentsToken (child) = assetId(valueOrErrorMessage(getString(investmentsTokenStore(child)), "investments asset id not found")) | |
114 | + | ||
115 | + | ||
116 | + | func userSkinStore (child,user) = ((("skin_" + child) + "_") + user) | |
117 | + | ||
118 | + | ||
119 | + | func userSkinHistoryStore (child,user) = (userSkinStore(child, user) + "_history") | |
120 | + | ||
121 | + | ||
122 | + | func investorStore (child,investor) = ((("investor_" + child) + "_") + investor) | |
123 | + | ||
124 | + | ||
125 | + | func assertNotStarted (child) = if (isDefined(getInteger(startHeightStore(child)))) | |
126 | + | then throw("already started") | |
127 | + | else false | |
128 | + | ||
129 | + | ||
130 | + | func assertNotCancelled (child) = if (isDefined(getInteger(cancelHeightStore(child)))) | |
131 | + | then throw("already canceled") | |
132 | + | else false | |
133 | + | ||
134 | + | ||
135 | + | func assertNotStartedPeriod (child) = if ((period(child) == 0)) | |
136 | + | then assertNotStarted(child) | |
137 | + | else if (isDefined(getInteger(startCurrentPeriodHeightStore(child)))) | |
138 | + | then throw("period already started") | |
139 | + | else false | |
140 | + | ||
141 | + | ||
142 | + | func userCommitment (child,user) = getInteger(userSkinStore(child, user)) | |
143 | + | ||
144 | + | ||
145 | + | func currentUserSkin (child,user) = valueOrElse(userCommitment(child, user), 0) | |
146 | + | ||
147 | + | ||
148 | + | func lockTime (child,period) = valueOrElse(getInteger(periodLockTimeStore(child, period)), valueOrErrorMessage(getInteger(lockTimeStore(child)), "no child lockTime")) | |
149 | + | ||
150 | + | ||
151 | + | func unlockHeight (child) = { | |
152 | + | let p = period(child) | |
153 | + | let periodStart = getInteger(startPeriodHeightStore(child, p)) | |
154 | + | if (isDefined(periodStart)) | |
155 | + | then (value(periodStart) + lockTime(child, p)) | |
156 | + | else { | |
157 | + | let prevPeriod = (p - 1) | |
158 | + | let childStart = valueOrErrorMessage(getInteger(startHeightStore(child)), "no child start height") | |
159 | + | (valueOrElse(getInteger(startPeriodHeightStore(child, prevPeriod)), childStart) + lockTime(child, prevPeriod)) | |
160 | + | } | |
161 | + | } | |
162 | + | ||
163 | + | ||
164 | + | func treasury (child) = valueOrElse(getString(treasuryStore(child)), child) | |
165 | + | ||
166 | + | ||
167 | + | func int (key) = toString(valueOrElse(getInteger(key), 0)) | |
168 | + | ||
169 | + | ||
170 | + | func str (key) = valueOrElse(getString(key), "") | |
171 | + | ||
172 | + | ||
173 | + | func adviseProject (child) = { | |
174 | + | let p = period(child) | |
175 | + | let periodStr = toString(p) | |
176 | + | ((((((((((((((((((((((((((((((((((((((((((((((((((("height: " + toString(HEIGHT)) + ", project: ") + child) + ", owner: ") + str(ownerStore(child))) + ", treasury: ") + treasury(child)) + ", lock_time: ") + int(lockTimeStore(child))) + ", skin_required: ") + int(skinRequiredStore(child))) + ", skin_max: ") + int(skinMaxStore(child))) + ", min_commitment: ") + int(minCommitmentStore(child))) + ", skin_total: ") + int(skinTotalStore(child))) + ", investments_required: ") + int(investmentsRequiredStore(child))) + ", investments_max: ") + int(investmentsMaxStore(child))) + ", investments_total: ") + int(investmentsTotalStore(child))) + ", investments_token: ") + str(investmentsTokenStore(child))) + ", commitments: ") + str(commitmentsStore(child))) + ", create_height: ") + int(createHeightStore(child))) + ", start_height: ") + toString(valueOrElse(getInteger(startHeightStore(child)), -1))) + ", cancel_height: ") + toString(valueOrElse(getInteger(cancelHeightStore(child)), -1))) + ", period: ") + periodStr) + ", period_") + periodStr) + "_start_after_height: ") + toString(valueOrElse(getInteger(startPeriodAfterHeightStore(child, p)), -1))) + ", period_") + periodStr) + "_start_height: ") + toString(valueOrElse(getInteger(startCurrentPeriodHeightStore(child)), -1))) + ", period_") + periodStr) + "_lock_time: ") + toString(lockTime(child, p))) + ", unlock_height: ") + toString(unlockHeight(child))) + ", period_investments_total: ") + int(investmentsPeriodTotalStore(child))) | |
177 | + | } | |
178 | + | ||
179 | + | ||
180 | + | func adviseUserProject (child,user) = ((((((((("height: " + toString(HEIGHT)) + ", project: ") + child) + ", skin:") + toString(currentUserSkin(child, user))) + ", power:") + toString(valueOrElse(userCommitment(child, user), 0))) + ", investments: ") + int(investorStore(child, user))) | |
181 | + | ||
182 | + | ||
183 | + | @Callable(i) | |
184 | + | func projectFor (owner,skin,maxSkin,minCommitment,lockTime,investments,maxInvestments,investmentsToken,commitments,child) = { | |
185 | + | let a = allowed("projectFor") | |
186 | + | if ((a == a)) | |
187 | + | then if (!(contains(mainAddresses, toString(i.caller)))) | |
188 | + | then throw("denied") | |
189 | + | else { | |
190 | + | let t = valueOrErrorMessage(addressFromString(child), "invalid treasury address") | |
191 | + | if ((t == t)) | |
192 | + | then { | |
193 | + | let token = assetId(investmentsToken) | |
194 | + | if ((token == token)) | |
195 | + | then if (if ((maxSkin > 0)) | |
196 | + | then (skin > maxSkin) | |
197 | + | else false) | |
198 | + | then throw("invalid maxSkin") | |
199 | + | else if (if ((maxInvestments > 0)) | |
200 | + | then (investments > maxInvestments) | |
201 | + | else false) | |
202 | + | then throw("invalid maxInvestments") | |
203 | + | else [writeConstString(ownerStore(child), owner), writeInt(createHeightStore(child), HEIGHT), writeInt(skinRequiredStore(child), skin), writeInt(skinMaxStore(child), maxSkin), writeInt(minCommitmentStore(child), minCommitment), writeInt(lockTimeStore(child), lockTime), writeInt(investmentsRequiredStore(child), investments), writeConstString(investmentsTokenStore(child), investmentsToken), writeConstString(commitmentsStore(child), commitments), writeConstString(treasuryStore(child), child), writeInt(investmentsMaxStore(child), maxInvestments)] | |
204 | + | else throw("Strict value is not equal to itself.") | |
205 | + | } | |
206 | + | else throw("Strict value is not equal to itself.") | |
207 | + | } | |
208 | + | else throw("Strict value is not equal to itself.") | |
209 | + | } | |
210 | + | ||
211 | + | ||
212 | + | ||
213 | + | @Callable(i) | |
214 | + | func increraseSkin (child,skinIncrement) = { | |
215 | + | let a = allowed("increraseSkin") | |
216 | + | if ((a == a)) | |
217 | + | then { | |
218 | + | let s = if (assertNotStarted(child)) | |
219 | + | then assertNotCancelled(child) | |
220 | + | else false | |
221 | + | if ((s == s)) | |
222 | + | then if ((0 >= skinIncrement)) | |
223 | + | then throw("invalid argument: skinIncrement should be positive") | |
224 | + | else { | |
225 | + | let owner = getStringValue(ownerStore(child)) | |
226 | + | if ((toString(i.caller) != owner)) | |
227 | + | then throw("denied") | |
228 | + | else [changeBy(skinRequiredStore(child), skinIncrement)] | |
229 | + | } | |
230 | + | else throw("Strict value is not equal to itself.") | |
231 | + | } | |
232 | + | else throw("Strict value is not equal to itself.") | |
233 | + | } | |
234 | + | ||
235 | + | ||
236 | + | ||
237 | + | @Callable(i) | |
238 | + | func commitFor (child,address) = { | |
239 | + | let a = allowed("commitFor") | |
240 | + | if ((a == a)) | |
241 | + | then { | |
242 | + | let s = assertNotStartedPeriod(child) | |
243 | + | if ((s == s)) | |
244 | + | then { | |
245 | + | let p = i.payments[0] | |
246 | + | if ((p.assetId != pwrAssetId)) | |
247 | + | then throw("invalid attached payment: $power token expected") | |
248 | + | else { | |
249 | + | let commitment = p.amount | |
250 | + | let minCommitment = valueOrErrorMessage(getInteger(minCommitmentStore(child)), "Child DAO not found") | |
251 | + | if ((minCommitment > commitment)) | |
252 | + | then throw(("Min. commitment is " + toString(minCommitment))) | |
253 | + | else { | |
254 | + | let skinTotalStore1 = skinTotalStore(child) | |
255 | + | let newSkinTotal = (valueOrElse(getInteger(skinTotalStore1), 0) + commitment) | |
256 | + | let skinMax = valueOrElse(getInteger(skinMaxStore(child)), 0) | |
257 | + | if (if ((skinMax > 0)) | |
258 | + | then (newSkinTotal > skinMax) | |
259 | + | else false) | |
260 | + | then throw(("Total max. skin is reached: " + toString(skinMax))) | |
261 | + | else [changeBy(userSkinStore(child, address), commitment), IntegerEntry(skinTotalStore1, newSkinTotal), changeBy(pwrTotalStore, commitment)] | |
262 | + | } | |
263 | + | } | |
264 | + | } | |
265 | + | else throw("Strict value is not equal to itself.") | |
266 | + | } | |
267 | + | else throw("Strict value is not equal to itself.") | |
268 | + | } | |
269 | + | ||
270 | + | ||
271 | + | ||
272 | + | @Callable(i) | |
273 | + | func commitForMiner (child,address) = { | |
274 | + | let a = allowed("commitForMiner") | |
275 | + | if ((a == a)) | |
276 | + | then if (!(contains(mainAddresses, toString(i.caller)))) | |
277 | + | then throw("denied") | |
278 | + | else { | |
279 | + | let p = i.payments[0] | |
280 | + | if (if ((p.assetId != pwrAssetId)) | |
281 | + | then true | |
282 | + | else (size(i.payments) != 1)) | |
283 | + | then throw("invalid payments: only $power token expected") | |
284 | + | else { | |
285 | + | let commitment = p.amount | |
286 | + | [changeBy(userSkinStore(child, address), commitment), changeBy(skinTotalStore(child), commitment), changeBy(pwrTotalStore, commitment)] | |
287 | + | } | |
288 | + | } | |
289 | + | else throw("Strict value is not equal to itself.") | |
290 | + | } | |
291 | + | ||
292 | + | ||
293 | + | ||
294 | + | @Callable(i) | |
295 | + | func invest (child) = { | |
296 | + | let a = allowed("invest") | |
297 | + | if ((a == a)) | |
298 | + | then { | |
299 | + | let s = assertNotStartedPeriod(child) | |
300 | + | if ((s == s)) | |
301 | + | then { | |
302 | + | let token = investmentsToken(child) | |
303 | + | if ((i.payments[0].assetId != token)) | |
304 | + | then throw("invalid investments asset id") | |
305 | + | else { | |
306 | + | let amount = i.payments[0].amount | |
307 | + | let maximum = valueOrElse(getInteger(investmentsMaxStore(child)), 0) | |
308 | + | func datas (a) = [changeBy(investorStore(child, toString(i.caller)), a), changeBy(investmentsTotalStore(child), a), changeBy(investmentsPeriodTotalStore(child), a)] | |
309 | + | ||
310 | + | if ((maximum > 0)) | |
311 | + | then { | |
312 | + | let totalStore = investmentsTotalStore(child) | |
313 | + | let total = valueOrElse(getInteger(totalStore), 0) | |
314 | + | let investmens = min([amount, (maximum - total)]) | |
315 | + | if ((0 >= investmens)) | |
316 | + | then throw(("Total max. investments is reached: " + toString(maximum))) | |
317 | + | else { | |
318 | + | let chargeBack = (amount - investmens) | |
319 | + | if ((chargeBack > 0)) | |
320 | + | then [ScriptTransfer(i.caller, chargeBack, token), datas(investmens)] | |
321 | + | else datas(investmens) | |
322 | + | } | |
323 | + | } | |
324 | + | else datas(amount) | |
325 | + | } | |
326 | + | } | |
327 | + | else throw("Strict value is not equal to itself.") | |
328 | + | } | |
329 | + | else throw("Strict value is not equal to itself.") | |
330 | + | } | |
331 | + | ||
332 | + | ||
333 | + | ||
334 | + | @Callable(i) | |
335 | + | func start (child) = { | |
336 | + | let paused = allowed("start") | |
337 | + | if ((paused == paused)) | |
338 | + | then { | |
339 | + | let s = if (assertNotStarted(child)) | |
340 | + | then assertNotCancelled(child) | |
341 | + | else false | |
342 | + | if ((s == s)) | |
343 | + | then { | |
344 | + | let totalSkin = valueOrElse(getInteger(skinTotalStore(child)), 0) | |
345 | + | let skinRequired = valueOrErrorMessage(getInteger(skinRequiredStore(child)), "child not registered") | |
346 | + | if ((skinRequired > totalSkin)) | |
347 | + | then throw("not enough skin in the game") | |
348 | + | else { | |
349 | + | let totalInvestments = valueOrElse(getInteger(investmentsTotalStore(child)), 0) | |
350 | + | if ((getIntegerValue(investmentsRequiredStore(child)) > totalInvestments)) | |
351 | + | then throw("not enough investments") | |
352 | + | else [IntegerEntry(startHeightStore(child), HEIGHT), ScriptTransfer(addressFromStringValue(treasury(child)), totalInvestments, investmentsToken(child))] | |
353 | + | } | |
354 | + | } | |
355 | + | else throw("Strict value is not equal to itself.") | |
356 | + | } | |
357 | + | else throw("Strict value is not equal to itself.") | |
358 | + | } | |
359 | + | ||
360 | + | ||
361 | + | ||
362 | + | @Callable(i) | |
363 | + | func initNextPeriod (child,blockBetweenPeriods,lockTime) = { | |
364 | + | let paused = allowed("initNextPeriod") | |
365 | + | if ((paused == paused)) | |
366 | + | then if (if ((toString(i.caller) != getStringValue(ownerStore(child)))) | |
367 | + | then (i.caller != this) | |
368 | + | else false) | |
369 | + | then throw("denied") | |
370 | + | else if ((0 > blockBetweenPeriods)) | |
371 | + | then throw("blockBetweenPeriods should be positive or zero") | |
372 | + | else if ((1 > lockTime)) | |
373 | + | then throw("lockTime should be positive") | |
374 | + | else { | |
375 | + | let unlockHeight_ = unlockHeight(child) | |
376 | + | if ((unlockHeight_ > HEIGHT)) | |
377 | + | then throw("current period is still active") | |
378 | + | else { | |
379 | + | let p = period(child) | |
380 | + | if (if ((p > 0)) | |
381 | + | then !(isDefined(startPeriodHeightStore(child, p))) | |
382 | + | else false) | |
383 | + | then throw("next period already initialized") | |
384 | + | else { | |
385 | + | let newPeriod = (p + 1) | |
386 | + | [IntegerEntry(periodStore(child), newPeriod), IntegerEntry(startPeriodAfterHeightStore(child, newPeriod), (unlockHeight_ + blockBetweenPeriods)), IntegerEntry(periodLockTimeStore(child, newPeriod), lockTime)] | |
387 | + | } | |
388 | + | } | |
389 | + | } | |
390 | + | else throw("Strict value is not equal to itself.") | |
391 | + | } | |
392 | + | ||
393 | + | ||
394 | + | ||
395 | + | @Callable(i) | |
396 | + | func startPeriod (child) = { | |
397 | + | let paused = allowed("startPeriod") | |
398 | + | if ((paused == paused)) | |
399 | + | then { | |
400 | + | let s = assertNotStartedPeriod(child) | |
401 | + | if ((s == s)) | |
402 | + | then { | |
403 | + | let period_ = period(child) | |
404 | + | let startAfterStore = startPeriodAfterHeightStore(child, period_) | |
405 | + | let startAfter = valueOrErrorMessage(getInteger(startAfterStore), ("key not found: " + startAfterStore)) | |
406 | + | if ((startAfter > HEIGHT)) | |
407 | + | then throw("too early") | |
408 | + | else { | |
409 | + | let totalSkin = valueOrElse(getInteger(skinTotalStore(child)), 0) | |
410 | + | let skinRequired = valueOrErrorMessage(getInteger(skinRequiredStore(child)), "child not registered") | |
411 | + | if ((skinRequired > totalSkin)) | |
412 | + | then throw("not enough skin in the game") | |
413 | + | else { | |
414 | + | let periodInvestments = valueOrElse(getInteger(investmentsPeriodTotalStore(child)), 0) | |
415 | + | [IntegerEntry(startCurrentPeriodHeightStore(child), HEIGHT), ScriptTransfer(addressFromStringValue(child), periodInvestments, investmentsToken(child))] | |
416 | + | } | |
417 | + | } | |
418 | + | } | |
419 | + | else throw("Strict value is not equal to itself.") | |
420 | + | } | |
421 | + | else throw("Strict value is not equal to itself.") | |
422 | + | } | |
423 | + | ||
424 | + | ||
425 | + | ||
426 | + | @Callable(i) | |
427 | + | func slash (child,amount) = { | |
428 | + | let paused = allowed("/") | |
429 | + | if ((paused == paused)) | |
430 | + | then if (!(contains(slashers, toString(i.caller)))) | |
431 | + | then throw("denied") | |
432 | + | else if (!(isDefined(getInteger(startHeightStore(child))))) | |
433 | + | then throw("not started") | |
434 | + | else [changeBy(skinTotalStore(child), -(amount)), Burn(pwrAssetId, amount)] | |
435 | + | else throw("Strict value is not equal to itself.") | |
436 | + | } | |
437 | + | ||
438 | + | ||
439 | + | ||
440 | + | @Callable(i) | |
441 | + | func complete (child) = { | |
442 | + | let paused = allowed("complete") | |
443 | + | if ((paused == paused)) | |
444 | + | then { | |
445 | + | let unlockHeight_ = unlockHeight(child) | |
446 | + | if ((unlockHeight_ > HEIGHT)) | |
447 | + | then throw("still locked") | |
448 | + | else { | |
449 | + | let user = toString(i.caller) | |
450 | + | let skin = currentUserSkin(child, user) | |
451 | + | if ((skin == 0)) | |
452 | + | then throw("you had no skin in the game") | |
453 | + | else { | |
454 | + | let total = getIntegerValue(skinTotalStore(child)) | |
455 | + | [ScriptTransfer(i.caller, skin, pwrAssetId), DeleteEntry(userSkinStore(child, user)), changeBy(skinTotalStore(child), -(skin)), changeBy(pwrTotalStore, -(skin)), IntegerEntry(userSkinHistoryStore(child, user), skin)] | |
456 | + | } | |
457 | + | } | |
458 | + | } | |
459 | + | else throw("Strict value is not equal to itself.") | |
460 | + | } | |
461 | + | ||
462 | + | ||
463 | + | ||
464 | + | @Callable(i) | |
465 | + | func cancel (child) = { | |
466 | + | let paused = allowed("cancel") | |
467 | + | if ((paused == paused)) | |
468 | + | then { | |
469 | + | let s = if (assertNotStarted(child)) | |
470 | + | then true | |
471 | + | else assertNotCancelled(child) | |
472 | + | if ((s == s)) | |
473 | + | then if ((toString(i.caller) != getStringValue(ownerStore(child)))) | |
474 | + | then throw("denied. not an owner") | |
475 | + | else [IntegerEntry(cancelHeightStore(child), HEIGHT)] | |
476 | + | else throw("Strict value is not equal to itself.") | |
477 | + | } | |
478 | + | else throw("Strict value is not equal to itself.") | |
479 | + | } | |
480 | + | ||
481 | + | ||
482 | + | ||
483 | + | @Callable(i) | |
484 | + | func undoInvest (child) = { | |
485 | + | let paused = allowed("undoInvest") | |
486 | + | if ((paused == paused)) | |
487 | + | then { | |
488 | + | let s = assertNotStarted(child) | |
489 | + | if ((s == s)) | |
490 | + | then { | |
491 | + | let investmentsStore1 = investorStore(child, toString(i.caller)) | |
492 | + | let investments = valueOrElse(getInteger(investmentsStore1), 0) | |
493 | + | if ((investments == 0)) | |
494 | + | then throw("no investments") | |
495 | + | else [DeleteEntry(investmentsStore1), changeBy(investmentsTotalStore(child), -(investments)), ScriptTransfer(i.caller, investments, investmentsToken(child))] | |
496 | + | } | |
497 | + | else throw("Strict value is not equal to itself.") | |
498 | + | } | |
499 | + | else throw("Strict value is not equal to itself.") | |
500 | + | } | |
501 | + | ||
502 | + | ||
503 | + | ||
504 | + | @Callable(i) | |
505 | + | func undoCommitFor (child,address) = { | |
506 | + | let paused = allowed("undoCommitFor") | |
507 | + | if ((paused == paused)) | |
508 | + | then if (!(contains(mainAddresses, toString(i.caller)))) | |
509 | + | then throw("denied") | |
510 | + | else { | |
511 | + | let s = assertNotStarted(child) | |
512 | + | if ((s == s)) | |
513 | + | then { | |
514 | + | let userSkinStore1 = userSkinStore(child, address) | |
515 | + | let skin = valueOrElse(getInteger(userSkinStore1), 0) | |
516 | + | if ((skin == 0)) | |
517 | + | then throw("no skin") | |
518 | + | else $Tuple2([DeleteEntry(userSkinStore1), changeBy(skinTotalStore(child), -(skin)), changeBy(pwrTotalStore, -(skin)), ScriptTransfer(i.caller, skin, pwrAssetId)], skin) | |
519 | + | } | |
520 | + | else throw("Strict value is not equal to itself.") | |
521 | + | } | |
522 | + | else throw("Strict value is not equal to itself.") | |
523 | + | } | |
524 | + | ||
525 | + | ||
526 | + | ||
527 | + | @Callable(i) | |
528 | + | func userPower (child,user) = $Tuple2(nil, valueOrElse(userCommitment(child, user), 0)) | |
529 | + | ||
530 | + | ||
531 | + | ||
532 | + | @Callable(i) | |
533 | + | func totalPower (child) = $Tuple2(nil, valueOrErrorMessage(getInteger(skinTotalStore(child)), "totalPower: child not found")) | |
534 | + | ||
535 | + | ||
536 | + | ||
537 | + | @Callable(i) | |
538 | + | func init (conf) = [writeConstString(configAddressStore, conf)] | |
539 | + | ||
540 | + |
github/deemru/w8io/026f985 32.51 ms ◑