tx · 5EPJnNx2cbQgkC2DJrXD9R4HsXZbvJwPoP8MRGKZybmv 3Mp5JgVSHA9iziujC9Kmnf2rCN5SYFE97yC: -0.01400000 Waves 2021.11.30 19:28 [1814015] smart account 3Mp5JgVSHA9iziujC9Kmnf2rCN5SYFE97yC > SELF 0.00000000 Waves
{ "type": 13, "id": "5EPJnNx2cbQgkC2DJrXD9R4HsXZbvJwPoP8MRGKZybmv", "fee": 1400000, "feeAssetId": null, "timestamp": 1638289766037, "version": 2, "chainId": 84, "sender": "3Mp5JgVSHA9iziujC9Kmnf2rCN5SYFE97yC", "senderPublicKey": "CSx1y2ADZAi6KvFZT2LoqQmX5qBxDVVGGZ6heDAGngHM", "proofs": [ "66JMjGagwjQD8Z2fD6ZSexv6sGFbcbaFXQNQcR61h351uv6S2c4o1ARK5qrkZg5qeZk4rbEN224fPDeJ1wCcfASa", "CHRpUC8sUKUGE5BFUvYukFLLQ5HxRTYHgZvLAnWXQEkjzN6oqD2Ua7Yj86zKe2ogm5A9REUT7c82nZWpmLHntLY" ], "script": "base64:AAIFAAAAAAAAABwIAhIHCgUBERgRGBIAEgMKAQgSBAoCAQgSABIAAAAAHQAAAAAJa2V5QWN0aXZlAgAAAAZhY3RpdmUAAAAADGtleUVuZEhlaWdodAIAAAAKZW5kX2hlaWdodAAAAAAPa2V5UHJpemVzUHJpY2VzAgAAAA1wcml6ZXNfcHJpY2VzAAAAAA1rZXlQcml6ZXNBSWRzAgAAABdwcml6ZXNfYWNoaWV2ZW1lbnRzX2lkcwAAAAAQa2V5UHJpemVzQW1vdW50cwIAAAANcHJpemVzX2Ftb3VudAAAAAAOa2V5TGV2ZWxQcmljZXMCAAAADGxldmVsX3ByaWNlcwAAAAAWa2V5TGV2ZWxBY2hpZXZlbW50c0lkcwIAAAAWbGV2ZWxfYWNoaWV2ZW1lbnRzX2lkcwAAAAAJa2V5U1dPUGlkAgAAAAdTV09QX2lkAAAAAA5rZXlUb3RhbEJ1cm5lZAIAAAAMdG90YWx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lZEJ5QWRtaW4DAwMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAxhZG1pblB1YktleTEGCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAMYWRtaW5QdWJLZXkyBgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAADGFkbWluUHViS2V5MwYJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAABJhZG1pblB1YktleVN0YWtpbmcEAAAAByRtYXRjaDAFAAAAAnR4BQAAABNtdWx0aVNpZ25lZEJ5QWRtaW5z5F+qGA==", "height": 1814015, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FDAMNwPMzBuVvi3QhTRwJWztDnCeuhCVPTjNB1zUL31k Next: DyfVjne47oHXsdn2Dw7xEYVD7ZGDUmFVx62haxzJSMcc Diff:
Old | New | Differences | |
---|---|---|---|
88 | 88 | ||
89 | 89 | 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5) | |
90 | 90 | } | |
91 | - | let lvlthree = levelPrices[3] | |
92 | - | let lvltwo = levelPrices[2] | |
93 | - | let lvlone = levelPrices[1] | |
94 | - | let lvlzero = levelPrices[0] | |
95 | - | if ((burned >= lvlthree)) | |
91 | + | if ((burned >= levelPrices[3])) | |
96 | 92 | then 4 | |
97 | - | else if ((burned >= | |
93 | + | else if ((burned >= levelPrices[2])) | |
98 | 94 | then 3 | |
99 | - | else if ((burned >= | |
95 | + | else if ((burned >= levelPrices[1])) | |
100 | 96 | then 2 | |
101 | - | else if ((burned >= | |
97 | + | else if ((burned >= levelPrices[0])) | |
102 | 98 | then 1 | |
103 | 99 | else 0 | |
104 | 100 | } | |
158 | 154 | ||
159 | 155 | @Callable(i) | |
160 | 156 | func add () = { | |
161 | - | let $ | |
162 | - | let pmtAmount = $ | |
163 | - | let pmtAssetId = $ | |
157 | + | let $t035253600 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
158 | + | let pmtAmount = $t035253600._1 | |
159 | + | let pmtAssetId = $t035253600._2 | |
164 | 160 | let endHeight = valueOrElse(getInteger(this, keyEndHeight), 0) | |
165 | 161 | if (!(isActive)) | |
166 | 162 | then throw("DApp is inactive at this moment") |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let keyActive = "active" | |
5 | 5 | ||
6 | 6 | let keyEndHeight = "end_height" | |
7 | 7 | ||
8 | 8 | let keyPrizesPrices = "prizes_prices" | |
9 | 9 | ||
10 | 10 | let keyPrizesAIds = "prizes_achievements_ids" | |
11 | 11 | ||
12 | 12 | let keyPrizesAmounts = "prizes_amount" | |
13 | 13 | ||
14 | 14 | let keyLevelPrices = "level_prices" | |
15 | 15 | ||
16 | 16 | let keyLevelAchievemntsIds = "level_achievements_ids" | |
17 | 17 | ||
18 | 18 | let keySWOPid = "SWOP_id" | |
19 | 19 | ||
20 | 20 | let keyTotalBurned = "total_burned" | |
21 | 21 | ||
22 | 22 | let keyVerifyHash = "verify_hash" | |
23 | 23 | ||
24 | 24 | let keyFinalizeHeight = "finalize_height" | |
25 | 25 | ||
26 | 26 | let keyUserTotalBurned = "_total_burned" | |
27 | 27 | ||
28 | 28 | let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9') | |
29 | 29 | ||
30 | 30 | let farming = Address(base58'3MsxHxruYWoddB4HRiPBYAWtMXMtCF1V9XT') | |
31 | 31 | ||
32 | 32 | let achievements = Address(base58'3N3HtdnBkqSSc16DaydiwtrMBUv3DfqKjSW') | |
33 | 33 | ||
34 | 34 | let keyAdminPubKey1 = "admin_pub_1" | |
35 | 35 | ||
36 | 36 | let keyAdminPubKey2 = "admin_pub_2" | |
37 | 37 | ||
38 | 38 | let keyAdminPubKey3 = "admin_pub_3" | |
39 | 39 | ||
40 | 40 | func getAdminPub (keyAdminPub) = match getString(oracle, keyAdminPub) { | |
41 | 41 | case string: String => | |
42 | 42 | fromBase58String(string) | |
43 | 43 | case nothing => | |
44 | 44 | throw("Admin public key is empty") | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | let adminPubKey1 = getAdminPub(keyAdminPubKey1) | |
49 | 49 | ||
50 | 50 | let adminPubKey2 = getAdminPub(keyAdminPubKey2) | |
51 | 51 | ||
52 | 52 | let adminPubKey3 = getAdminPub(keyAdminPubKey3) | |
53 | 53 | ||
54 | 54 | let adminPubKeyStaking = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
55 | 55 | ||
56 | 56 | let swopId = fromBase58String(getStringValue(farming, keySWOPid)) | |
57 | 57 | ||
58 | 58 | let isActive = valueOrElse(getBoolean(this, keyActive), true) | |
59 | 59 | ||
60 | 60 | func inListToStr (acc,next) = if ((acc == "")) | |
61 | 61 | then (acc + toString(next)) | |
62 | 62 | else ((acc + ",") + toString(next)) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func inListToInt (acc,next) = (acc :+ parseIntValue(next)) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func calcPrizesAmounts (acc,next) = { | |
69 | 69 | let $t016511676 = acc | |
70 | 70 | let total = $t016511676._1 | |
71 | 71 | let result = $t016511676._2 | |
72 | 72 | $Tuple2(total, (result :+ (total / next))) | |
73 | 73 | } | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func calcLevel (burned) = { | |
77 | 77 | let levelPrices = { | |
78 | 78 | let $l = split(getStringValue(this, keyLevelPrices), ",") | |
79 | 79 | let $s = size($l) | |
80 | 80 | let $acc0 = nil | |
81 | 81 | func 1 ($a,$i) = if (($i >= $s)) | |
82 | 82 | then $a | |
83 | 83 | else inListToInt($a, $l[$i]) | |
84 | 84 | ||
85 | 85 | func 2 ($a,$i) = if (($i >= $s)) | |
86 | 86 | then $a | |
87 | 87 | else throw("List size exceeds 5") | |
88 | 88 | ||
89 | 89 | 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5) | |
90 | 90 | } | |
91 | - | let lvlthree = levelPrices[3] | |
92 | - | let lvltwo = levelPrices[2] | |
93 | - | let lvlone = levelPrices[1] | |
94 | - | let lvlzero = levelPrices[0] | |
95 | - | if ((burned >= lvlthree)) | |
91 | + | if ((burned >= levelPrices[3])) | |
96 | 92 | then 4 | |
97 | - | else if ((burned >= | |
93 | + | else if ((burned >= levelPrices[2])) | |
98 | 94 | then 3 | |
99 | - | else if ((burned >= | |
95 | + | else if ((burned >= levelPrices[1])) | |
100 | 96 | then 2 | |
101 | - | else if ((burned >= | |
97 | + | else if ((burned >= levelPrices[0])) | |
102 | 98 | then 1 | |
103 | 99 | else 0 | |
104 | 100 | } | |
105 | 101 | ||
106 | 102 | ||
107 | 103 | @Callable(i) | |
108 | 104 | func init (endHeight,prizePrices,prizeAchievmentsIds,levelPrices,levelAchievmentsIds) = if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
109 | 105 | then throw("Only admin can call this function") | |
110 | 106 | else if (isDefined(getInteger(this, keyEndHeight))) | |
111 | 107 | then throw("DApp is already inited") | |
112 | 108 | else if ((height > endHeight)) | |
113 | 109 | then throw("Burning ending must be greater than current height") | |
114 | 110 | else if (if ((size(prizePrices) != 5)) | |
115 | 111 | then true | |
116 | 112 | else (size(prizeAchievmentsIds) != 5)) | |
117 | 113 | then throw("Amount of prizes achievemts lists must equal to 5") | |
118 | 114 | else if (if ((size(levelPrices) != 4)) | |
119 | 115 | then true | |
120 | 116 | else (size(levelAchievmentsIds) != 4)) | |
121 | 117 | then throw("Amount of levels lists must equal to 4") | |
122 | 118 | else { | |
123 | 119 | let prizePricesStr = { | |
124 | 120 | let $l = prizePrices | |
125 | 121 | let $s = size($l) | |
126 | 122 | let $acc0 = "" | |
127 | 123 | func 1 ($a,$i) = if (($i >= $s)) | |
128 | 124 | then $a | |
129 | 125 | else inListToStr($a, $l[$i]) | |
130 | 126 | ||
131 | 127 | func 2 ($a,$i) = if (($i >= $s)) | |
132 | 128 | then $a | |
133 | 129 | else throw("List size exceeds 5") | |
134 | 130 | ||
135 | 131 | 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5) | |
136 | 132 | } | |
137 | 133 | let prizeAchievmentsIdsStr = makeString(prizeAchievmentsIds, ",") | |
138 | 134 | let levelPricesStr = { | |
139 | 135 | let $l = levelPrices | |
140 | 136 | let $s = size($l) | |
141 | 137 | let $acc0 = "" | |
142 | 138 | func 1 ($a,$i) = if (($i >= $s)) | |
143 | 139 | then $a | |
144 | 140 | else inListToStr($a, $l[$i]) | |
145 | 141 | ||
146 | 142 | func 2 ($a,$i) = if (($i >= $s)) | |
147 | 143 | then $a | |
148 | 144 | else throw("List size exceeds 5") | |
149 | 145 | ||
150 | 146 | 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5) | |
151 | 147 | } | |
152 | 148 | let levelAchievmentsIdsStr = makeString(levelAchievmentsIds, ",") | |
153 | 149 | let prizesAmountStr = "0,0,0,0,0" | |
154 | 150 | [IntegerEntry(keyEndHeight, endHeight), StringEntry(keyPrizesPrices, prizePricesStr), StringEntry(keyPrizesAIds, prizeAchievmentsIdsStr), StringEntry(keyLevelPrices, levelPricesStr), StringEntry(keyLevelAchievemntsIds, levelAchievmentsIdsStr), StringEntry(keyPrizesAmounts, prizesAmountStr)] | |
155 | 151 | } | |
156 | 152 | ||
157 | 153 | ||
158 | 154 | ||
159 | 155 | @Callable(i) | |
160 | 156 | func add () = { | |
161 | - | let $ | |
162 | - | let pmtAmount = $ | |
163 | - | let pmtAssetId = $ | |
157 | + | let $t035253600 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
158 | + | let pmtAmount = $t035253600._1 | |
159 | + | let pmtAssetId = $t035253600._2 | |
164 | 160 | let endHeight = valueOrElse(getInteger(this, keyEndHeight), 0) | |
165 | 161 | if (!(isActive)) | |
166 | 162 | then throw("DApp is inactive at this moment") | |
167 | 163 | else if (if ((height > endHeight)) | |
168 | 164 | then true | |
169 | 165 | else (endHeight == 0)) | |
170 | 166 | then throw("Swop burning are ended or not started yet") | |
171 | 167 | else if ((pmtAssetId != swopId)) | |
172 | 168 | then throw("You can add only SWOP token") | |
173 | 169 | else { | |
174 | 170 | let newTotalBurned = (valueOrElse(getInteger(this, keyTotalBurned), 0) + pmtAmount) | |
175 | 171 | let userTotalBurned = valueOrElse(getInteger(this, (toString(i.caller) + keyUserTotalBurned)), 0) | |
176 | 172 | let prizesAmounts = { | |
177 | 173 | let $l = split(getStringValue(this, keyPrizesAmounts), ",") | |
178 | 174 | let $s = size($l) | |
179 | 175 | let $acc0 = nil | |
180 | 176 | func 1 ($a,$i) = if (($i >= $s)) | |
181 | 177 | then $a | |
182 | 178 | else inListToInt($a, $l[$i]) | |
183 | 179 | ||
184 | 180 | func 2 ($a,$i) = if (($i >= $s)) | |
185 | 181 | then $a | |
186 | 182 | else throw("List size exceeds 5") | |
187 | 183 | ||
188 | 184 | 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5) | |
189 | 185 | } | |
190 | 186 | let prizesPrices = { | |
191 | 187 | let $l = split(getStringValue(this, keyPrizesPrices), ",") | |
192 | 188 | let $s = size($l) | |
193 | 189 | let $acc0 = nil | |
194 | 190 | func 1 ($a,$i) = if (($i >= $s)) | |
195 | 191 | then $a | |
196 | 192 | else inListToInt($a, $l[$i]) | |
197 | 193 | ||
198 | 194 | func 2 ($a,$i) = if (($i >= $s)) | |
199 | 195 | then $a | |
200 | 196 | else throw("List size exceeds 5") | |
201 | 197 | ||
202 | 198 | 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5) | |
203 | 199 | } | |
204 | 200 | let prizesAchievementsIds = split(getStringValue(this, keyPrizesAIds), ",") | |
205 | 201 | let levelAchievementsIds = split(getStringValue(this, keyLevelAchievemntsIds), ",") | |
206 | 202 | let res = { | |
207 | 203 | let $l = prizesPrices | |
208 | 204 | let $s = size($l) | |
209 | 205 | let $acc0 = $Tuple2(newTotalBurned, nil) | |
210 | 206 | func 1 ($a,$i) = if (($i >= $s)) | |
211 | 207 | then $a | |
212 | 208 | else calcPrizesAmounts($a, $l[$i]) | |
213 | 209 | ||
214 | 210 | func 2 ($a,$i) = if (($i >= $s)) | |
215 | 211 | then $a | |
216 | 212 | else throw("List size exceeds 5") | |
217 | 213 | ||
218 | 214 | 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5) | |
219 | 215 | } | |
220 | 216 | let newPrizesAmounts = res._2 | |
221 | 217 | let newPrizesAmountsStr = { | |
222 | 218 | let $l = newPrizesAmounts | |
223 | 219 | let $s = size($l) | |
224 | 220 | let $acc0 = "" | |
225 | 221 | func 1 ($a,$i) = if (($i >= $s)) | |
226 | 222 | then $a | |
227 | 223 | else inListToStr($a, $l[$i]) | |
228 | 224 | ||
229 | 225 | func 2 ($a,$i) = if (($i >= $s)) | |
230 | 226 | then $a | |
231 | 227 | else throw("List size exceeds 5") | |
232 | 228 | ||
233 | 229 | 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5) | |
234 | 230 | } | |
235 | 231 | let inv0 = if ((newPrizesAmounts[0] != prizesAmounts[0])) | |
236 | 232 | then { | |
237 | 233 | let achievementAmount = (newPrizesAmounts[0] - prizesAmounts[0]) | |
238 | 234 | invoke(achievements, "add", [prizesAchievementsIds[0], achievementAmount], nil) | |
239 | 235 | } | |
240 | 236 | else 0 | |
241 | 237 | if ((inv0 == inv0)) | |
242 | 238 | then { | |
243 | 239 | let inv1 = if ((newPrizesAmounts[1] != prizesAmounts[1])) | |
244 | 240 | then { | |
245 | 241 | let achievementAmount = (newPrizesAmounts[1] - prizesAmounts[1]) | |
246 | 242 | invoke(achievements, "add", [prizesAchievementsIds[1], achievementAmount], nil) | |
247 | 243 | } | |
248 | 244 | else 0 | |
249 | 245 | if ((inv1 == inv1)) | |
250 | 246 | then { | |
251 | 247 | let inv2 = if ((newPrizesAmounts[2] != prizesAmounts[2])) | |
252 | 248 | then { | |
253 | 249 | let achievementAmount = (newPrizesAmounts[2] - prizesAmounts[2]) | |
254 | 250 | invoke(achievements, "add", [prizesAchievementsIds[2], achievementAmount], nil) | |
255 | 251 | } | |
256 | 252 | else 0 | |
257 | 253 | if ((inv2 == inv2)) | |
258 | 254 | then { | |
259 | 255 | let inv3 = if ((newPrizesAmounts[3] != prizesAmounts[3])) | |
260 | 256 | then { | |
261 | 257 | let achievementAmount = (newPrizesAmounts[3] - prizesAmounts[3]) | |
262 | 258 | invoke(achievements, "add", [prizesAchievementsIds[3], achievementAmount], nil) | |
263 | 259 | } | |
264 | 260 | else 0 | |
265 | 261 | if ((inv3 == inv3)) | |
266 | 262 | then { | |
267 | 263 | let inv4 = if ((newPrizesAmounts[4] != prizesAmounts[4])) | |
268 | 264 | then { | |
269 | 265 | let achievementAmount = (newPrizesAmounts[4] - prizesAmounts[4]) | |
270 | 266 | invoke(achievements, "add", [prizesAchievementsIds[4], achievementAmount], nil) | |
271 | 267 | } | |
272 | 268 | else 0 | |
273 | 269 | if ((inv4 == inv4)) | |
274 | 270 | then { | |
275 | 271 | let baseEntry = [IntegerEntry(keyTotalBurned, newTotalBurned), IntegerEntry((toString(i.caller) + keyUserTotalBurned), (userTotalBurned + pmtAmount)), StringEntry(keyPrizesAmounts, newPrizesAmountsStr)] | |
276 | 272 | let oldLevel = calcLevel(userTotalBurned) | |
277 | 273 | let newLevel = calcLevel(newTotalBurned) | |
278 | 274 | let levelDiff = (newLevel - oldLevel) | |
279 | 275 | if ((levelDiff > 0)) | |
280 | 276 | then { | |
281 | 277 | let inv5 = if ((levelDiff == 1)) | |
282 | 278 | then invoke(achievements, "add", [levelAchievementsIds[(newLevel - 1)], 1], nil) | |
283 | 279 | else 0 | |
284 | 280 | if ((inv5 == inv5)) | |
285 | 281 | then { | |
286 | 282 | let inv6 = if ((levelDiff >= 2)) | |
287 | 283 | then invoke(achievements, "add", [levelAchievementsIds[(newLevel - 2)], 1], nil) | |
288 | 284 | else 0 | |
289 | 285 | if ((inv6 == inv6)) | |
290 | 286 | then { | |
291 | 287 | let inv7 = if ((levelDiff >= 3)) | |
292 | 288 | then invoke(achievements, "add", [levelAchievementsIds[(newLevel - 3)], 1], nil) | |
293 | 289 | else 0 | |
294 | 290 | if ((inv7 == inv7)) | |
295 | 291 | then { | |
296 | 292 | let inv8 = if ((levelDiff == 4)) | |
297 | 293 | then invoke(achievements, "add", [levelAchievementsIds[(newLevel - 4)], 1], nil) | |
298 | 294 | else 0 | |
299 | 295 | if ((inv8 == inv8)) | |
300 | 296 | then baseEntry | |
301 | 297 | else throw("Strict value is not equal to itself.") | |
302 | 298 | } | |
303 | 299 | else throw("Strict value is not equal to itself.") | |
304 | 300 | } | |
305 | 301 | else throw("Strict value is not equal to itself.") | |
306 | 302 | } | |
307 | 303 | else throw("Strict value is not equal to itself.") | |
308 | 304 | } | |
309 | 305 | else baseEntry | |
310 | 306 | } | |
311 | 307 | else throw("Strict value is not equal to itself.") | |
312 | 308 | } | |
313 | 309 | else throw("Strict value is not equal to itself.") | |
314 | 310 | } | |
315 | 311 | else throw("Strict value is not equal to itself.") | |
316 | 312 | } | |
317 | 313 | else throw("Strict value is not equal to itself.") | |
318 | 314 | } | |
319 | 315 | else throw("Strict value is not equal to itself.") | |
320 | 316 | } | |
321 | 317 | } | |
322 | 318 | ||
323 | 319 | ||
324 | 320 | ||
325 | 321 | @Callable(i) | |
326 | 322 | func hashingRandom (hash) = if (!(isActive)) | |
327 | 323 | then throw("DApp is inactive at this moment") | |
328 | 324 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
329 | 325 | then throw("Only admin can call this function") | |
330 | 326 | else [StringEntry(keyVerifyHash, hash)] | |
331 | 327 | ||
332 | 328 | ||
333 | 329 | ||
334 | 330 | @Callable(i) | |
335 | 331 | func finalize (vrfHeight,secretWord) = { | |
336 | 332 | let savedHash = getStringValue(this, keyVerifyHash) | |
337 | 333 | let calcHash = toBase58String(sha256((toBytes(vrfHeight) + toBytes(secretWord)))) | |
338 | 334 | if (!(isActive)) | |
339 | 335 | then throw("DApp is inactive at this moment") | |
340 | 336 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
341 | 337 | then throw("Only admin can call this function") | |
342 | 338 | else if ((calcHash != savedHash)) | |
343 | 339 | then throw("vrf Height hash not matching") | |
344 | 340 | else { | |
345 | 341 | let burnAmount = getIntegerValue(this, keyTotalBurned) | |
346 | 342 | [Burn(swopId, burnAmount), IntegerEntry(keyFinalizeHeight, height)] | |
347 | 343 | } | |
348 | 344 | } | |
349 | 345 | ||
350 | 346 | ||
351 | 347 | ||
352 | 348 | @Callable(i) | |
353 | 349 | func shutdown () = if (!(isActive)) | |
354 | 350 | then throw("DApp already inactive") | |
355 | 351 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
356 | 352 | then throw("Only admin can call this function") | |
357 | 353 | else [BooleanEntry(keyActive, false)] | |
358 | 354 | ||
359 | 355 | ||
360 | 356 | ||
361 | 357 | @Callable(i) | |
362 | 358 | func activate () = if (isActive) | |
363 | 359 | then throw("DApp already active") | |
364 | 360 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
365 | 361 | then throw("Only admin can call this function") | |
366 | 362 | else [BooleanEntry(keyActive, true)] | |
367 | 363 | ||
368 | 364 | ||
369 | 365 | @Verifier(tx) | |
370 | 366 | func verify () = { | |
371 | 367 | let multiSignedByAdmins = { | |
372 | 368 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
373 | 369 | then 1 | |
374 | 370 | else 0 | |
375 | 371 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
376 | 372 | then 1 | |
377 | 373 | else 0 | |
378 | 374 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
379 | 375 | then 1 | |
380 | 376 | else 0 | |
381 | 377 | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
382 | 378 | } | |
383 | 379 | let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
384 | 380 | then true | |
385 | 381 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2)) | |
386 | 382 | then true | |
387 | 383 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3)) | |
388 | 384 | then true | |
389 | 385 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyStaking) | |
390 | 386 | match tx { | |
391 | 387 | case _ => | |
392 | 388 | multiSignedByAdmins | |
393 | 389 | } | |
394 | 390 | } | |
395 | 391 |
github/deemru/w8io/169f3d6 73.33 ms ◑