tx · FDAMNwPMzBuVvi3QhTRwJWztDnCeuhCVPTjNB1zUL31k 3Mp5JgVSHA9iziujC9Kmnf2rCN5SYFE97yC: -0.01400000 Waves 2021.11.30 19:10 [1813997] smart account 3Mp5JgVSHA9iziujC9Kmnf2rCN5SYFE97yC > SELF 0.00000000 Waves
{ "type": 13, "id": "FDAMNwPMzBuVvi3QhTRwJWztDnCeuhCVPTjNB1zUL31k", "fee": 1400000, "feeAssetId": null, "timestamp": 1638288605913, "version": 2, "chainId": 84, "sender": "3Mp5JgVSHA9iziujC9Kmnf2rCN5SYFE97yC", "senderPublicKey": "CSx1y2ADZAi6KvFZT2LoqQmX5qBxDVVGGZ6heDAGngHM", "proofs": [ "6Kfcw7n8BPX821acJKXMXAmzxtDqCBkaV85MfCbS1RdEBVxizwcEg5hzPWMZ37D4Sgn4q54Rt7KWVdjxGZvaeCW", "hyBDSbtwGqyEmSsW8JNyZjfTFAFqwmBR44Pu7Rk23QeXR7dcmqUkwmx6DaRnzwFD7CcnY95k5QyrVeqgTPTbvDq" ], "script": "base64:AAIFAAAAAAAAABwIAhIHCgUBERgRGBIAEgMKAQgSBAoCAQgSABIAAAAAHQAAAAAJa2V5QWN0aXZlAgAAAAZhY3RpdmUAAAAADGtleUVuZEhlaWdodAIAAAAKZW5kX2hlaWdodAAAAAAPa2V5UHJpemVzUHJpY2VzAgAAAA1wcml6ZXNfcHJpY2VzAAAAAA1rZXlQcml6ZXNBSWRzAgAAABdwcml6ZXNfYWNoaWV2ZW1lbnRzX2lkcwAAAAAQa2V5UHJpemVzQW1vdW50cwIAAAANcHJpemVzX2Ftb3VudAAAAAAOa2V5TGV2ZWxQcmljZXMCAAAADGxldmVsX3ByaWNlcwAAAAAWa2V5TGV2ZWxBY2hpZXZlbW50c0lkcwIAAAAWbGV2ZWxfYWNoaWV2ZW1lbnRzX2lkcwAAAAAJa2V5U1dPUGlkAgAAAAdTV09QX2lkAAAAAA5rZXlUb3RhbEJ1cm5lZAIAAAAMdG90YWx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AAAAAAAAAAAkAAGcAAAACCQAAZAAAAAIJAABkAAAAAgUAAAASYWRtaW5QdWJLZXkxU2lnbmVkBQAAABJhZG1pblB1YktleTJTaWduZWQFAAAAEmFkbWluUHViS2V5M1NpZ25lZAAAAAAAAAAAAgQAAAANc2lnbmVkQnlBZG1pbgMDAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAADGFkbWluUHViS2V5MQYJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAxhZG1pblB1YktleTIGCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAMYWRtaW5QdWJLZXkzBgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAEmFkbWluUHViS2V5U3Rha2luZwQAAAAHJG1hdGNoMAUAAAACdHgFAAAAE211bHRpU2lnbmVkQnlBZG1pbnOj+bta", "height": 1813997, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FsJSMEA8njEumeQMn9cuRNK7dKX9fBrC8ZHdGH1Scaud Next: 5EPJnNx2cbQgkC2DJrXD9R4HsXZbvJwPoP8MRGKZybmv Diff:
Old | New | Differences | |
---|---|---|---|
88 | 88 | ||
89 | 89 | 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5) | |
90 | 90 | } | |
91 | - | if ((burned >= levelPrices[3])) | |
91 | + | let lvlthree = levelPrices[3] | |
92 | + | let lvltwo = levelPrices[2] | |
93 | + | let lvlone = levelPrices[1] | |
94 | + | let lvlzero = levelPrices[0] | |
95 | + | if ((burned >= lvlthree)) | |
92 | 96 | then 4 | |
93 | - | else if ((burned >= | |
97 | + | else if ((burned >= lvlthree)) | |
94 | 98 | then 3 | |
95 | - | else if ((burned >= | |
99 | + | else if ((burned >= lvltwo)) | |
96 | 100 | then 2 | |
97 | - | else if ((burned >= | |
101 | + | else if ((burned >= lvlone)) | |
98 | 102 | then 1 | |
99 | 103 | else 0 | |
100 | 104 | } | |
154 | 158 | ||
155 | 159 | @Callable(i) | |
156 | 160 | func add () = { | |
157 | - | let $ | |
158 | - | let pmtAmount = $ | |
159 | - | let pmtAssetId = $ | |
161 | + | let $t036213696 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
162 | + | let pmtAmount = $t036213696._1 | |
163 | + | let pmtAssetId = $t036213696._2 | |
160 | 164 | let endHeight = valueOrElse(getInteger(this, keyEndHeight), 0) | |
161 | 165 | if (!(isActive)) | |
162 | 166 | 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 | - | if ((burned >= levelPrices[3])) | |
91 | + | let lvlthree = levelPrices[3] | |
92 | + | let lvltwo = levelPrices[2] | |
93 | + | let lvlone = levelPrices[1] | |
94 | + | let lvlzero = levelPrices[0] | |
95 | + | if ((burned >= lvlthree)) | |
92 | 96 | then 4 | |
93 | - | else if ((burned >= | |
97 | + | else if ((burned >= lvlthree)) | |
94 | 98 | then 3 | |
95 | - | else if ((burned >= | |
99 | + | else if ((burned >= lvltwo)) | |
96 | 100 | then 2 | |
97 | - | else if ((burned >= | |
101 | + | else if ((burned >= lvlone)) | |
98 | 102 | then 1 | |
99 | 103 | else 0 | |
100 | 104 | } | |
101 | 105 | ||
102 | 106 | ||
103 | 107 | @Callable(i) | |
104 | 108 | func init (endHeight,prizePrices,prizeAchievmentsIds,levelPrices,levelAchievmentsIds) = if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
105 | 109 | then throw("Only admin can call this function") | |
106 | 110 | else if (isDefined(getInteger(this, keyEndHeight))) | |
107 | 111 | then throw("DApp is already inited") | |
108 | 112 | else if ((height > endHeight)) | |
109 | 113 | then throw("Burning ending must be greater than current height") | |
110 | 114 | else if (if ((size(prizePrices) != 5)) | |
111 | 115 | then true | |
112 | 116 | else (size(prizeAchievmentsIds) != 5)) | |
113 | 117 | then throw("Amount of prizes achievemts lists must equal to 5") | |
114 | 118 | else if (if ((size(levelPrices) != 4)) | |
115 | 119 | then true | |
116 | 120 | else (size(levelAchievmentsIds) != 4)) | |
117 | 121 | then throw("Amount of levels lists must equal to 4") | |
118 | 122 | else { | |
119 | 123 | let prizePricesStr = { | |
120 | 124 | let $l = prizePrices | |
121 | 125 | let $s = size($l) | |
122 | 126 | let $acc0 = "" | |
123 | 127 | func 1 ($a,$i) = if (($i >= $s)) | |
124 | 128 | then $a | |
125 | 129 | else inListToStr($a, $l[$i]) | |
126 | 130 | ||
127 | 131 | func 2 ($a,$i) = if (($i >= $s)) | |
128 | 132 | then $a | |
129 | 133 | else throw("List size exceeds 5") | |
130 | 134 | ||
131 | 135 | 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5) | |
132 | 136 | } | |
133 | 137 | let prizeAchievmentsIdsStr = makeString(prizeAchievmentsIds, ",") | |
134 | 138 | let levelPricesStr = { | |
135 | 139 | let $l = levelPrices | |
136 | 140 | let $s = size($l) | |
137 | 141 | let $acc0 = "" | |
138 | 142 | func 1 ($a,$i) = if (($i >= $s)) | |
139 | 143 | then $a | |
140 | 144 | else inListToStr($a, $l[$i]) | |
141 | 145 | ||
142 | 146 | func 2 ($a,$i) = if (($i >= $s)) | |
143 | 147 | then $a | |
144 | 148 | else throw("List size exceeds 5") | |
145 | 149 | ||
146 | 150 | 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5) | |
147 | 151 | } | |
148 | 152 | let levelAchievmentsIdsStr = makeString(levelAchievmentsIds, ",") | |
149 | 153 | let prizesAmountStr = "0,0,0,0,0" | |
150 | 154 | [IntegerEntry(keyEndHeight, endHeight), StringEntry(keyPrizesPrices, prizePricesStr), StringEntry(keyPrizesAIds, prizeAchievmentsIdsStr), StringEntry(keyLevelPrices, levelPricesStr), StringEntry(keyLevelAchievemntsIds, levelAchievmentsIdsStr), StringEntry(keyPrizesAmounts, prizesAmountStr)] | |
151 | 155 | } | |
152 | 156 | ||
153 | 157 | ||
154 | 158 | ||
155 | 159 | @Callable(i) | |
156 | 160 | func add () = { | |
157 | - | let $ | |
158 | - | let pmtAmount = $ | |
159 | - | let pmtAssetId = $ | |
161 | + | let $t036213696 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
162 | + | let pmtAmount = $t036213696._1 | |
163 | + | let pmtAssetId = $t036213696._2 | |
160 | 164 | let endHeight = valueOrElse(getInteger(this, keyEndHeight), 0) | |
161 | 165 | if (!(isActive)) | |
162 | 166 | then throw("DApp is inactive at this moment") | |
163 | 167 | else if (if ((height > endHeight)) | |
164 | 168 | then true | |
165 | 169 | else (endHeight == 0)) | |
166 | 170 | then throw("Swop burning are ended or not started yet") | |
167 | 171 | else if ((pmtAssetId != swopId)) | |
168 | 172 | then throw("You can add only SWOP token") | |
169 | 173 | else { | |
170 | 174 | let newTotalBurned = (valueOrElse(getInteger(this, keyTotalBurned), 0) + pmtAmount) | |
171 | 175 | let userTotalBurned = valueOrElse(getInteger(this, (toString(i.caller) + keyUserTotalBurned)), 0) | |
172 | 176 | let prizesAmounts = { | |
173 | 177 | let $l = split(getStringValue(this, keyPrizesAmounts), ",") | |
174 | 178 | let $s = size($l) | |
175 | 179 | let $acc0 = nil | |
176 | 180 | func 1 ($a,$i) = if (($i >= $s)) | |
177 | 181 | then $a | |
178 | 182 | else inListToInt($a, $l[$i]) | |
179 | 183 | ||
180 | 184 | func 2 ($a,$i) = if (($i >= $s)) | |
181 | 185 | then $a | |
182 | 186 | else throw("List size exceeds 5") | |
183 | 187 | ||
184 | 188 | 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5) | |
185 | 189 | } | |
186 | 190 | let prizesPrices = { | |
187 | 191 | let $l = split(getStringValue(this, keyPrizesPrices), ",") | |
188 | 192 | let $s = size($l) | |
189 | 193 | let $acc0 = nil | |
190 | 194 | func 1 ($a,$i) = if (($i >= $s)) | |
191 | 195 | then $a | |
192 | 196 | else inListToInt($a, $l[$i]) | |
193 | 197 | ||
194 | 198 | func 2 ($a,$i) = if (($i >= $s)) | |
195 | 199 | then $a | |
196 | 200 | else throw("List size exceeds 5") | |
197 | 201 | ||
198 | 202 | 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5) | |
199 | 203 | } | |
200 | 204 | let prizesAchievementsIds = split(getStringValue(this, keyPrizesAIds), ",") | |
201 | 205 | let levelAchievementsIds = split(getStringValue(this, keyLevelAchievemntsIds), ",") | |
202 | 206 | let res = { | |
203 | 207 | let $l = prizesPrices | |
204 | 208 | let $s = size($l) | |
205 | 209 | let $acc0 = $Tuple2(newTotalBurned, nil) | |
206 | 210 | func 1 ($a,$i) = if (($i >= $s)) | |
207 | 211 | then $a | |
208 | 212 | else calcPrizesAmounts($a, $l[$i]) | |
209 | 213 | ||
210 | 214 | func 2 ($a,$i) = if (($i >= $s)) | |
211 | 215 | then $a | |
212 | 216 | else throw("List size exceeds 5") | |
213 | 217 | ||
214 | 218 | 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5) | |
215 | 219 | } | |
216 | 220 | let newPrizesAmounts = res._2 | |
217 | 221 | let newPrizesAmountsStr = { | |
218 | 222 | let $l = newPrizesAmounts | |
219 | 223 | let $s = size($l) | |
220 | 224 | let $acc0 = "" | |
221 | 225 | func 1 ($a,$i) = if (($i >= $s)) | |
222 | 226 | then $a | |
223 | 227 | else inListToStr($a, $l[$i]) | |
224 | 228 | ||
225 | 229 | func 2 ($a,$i) = if (($i >= $s)) | |
226 | 230 | then $a | |
227 | 231 | else throw("List size exceeds 5") | |
228 | 232 | ||
229 | 233 | 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5) | |
230 | 234 | } | |
231 | 235 | let inv0 = if ((newPrizesAmounts[0] != prizesAmounts[0])) | |
232 | 236 | then { | |
233 | 237 | let achievementAmount = (newPrizesAmounts[0] - prizesAmounts[0]) | |
234 | 238 | invoke(achievements, "add", [prizesAchievementsIds[0], achievementAmount], nil) | |
235 | 239 | } | |
236 | 240 | else 0 | |
237 | 241 | if ((inv0 == inv0)) | |
238 | 242 | then { | |
239 | 243 | let inv1 = if ((newPrizesAmounts[1] != prizesAmounts[1])) | |
240 | 244 | then { | |
241 | 245 | let achievementAmount = (newPrizesAmounts[1] - prizesAmounts[1]) | |
242 | 246 | invoke(achievements, "add", [prizesAchievementsIds[1], achievementAmount], nil) | |
243 | 247 | } | |
244 | 248 | else 0 | |
245 | 249 | if ((inv1 == inv1)) | |
246 | 250 | then { | |
247 | 251 | let inv2 = if ((newPrizesAmounts[2] != prizesAmounts[2])) | |
248 | 252 | then { | |
249 | 253 | let achievementAmount = (newPrizesAmounts[2] - prizesAmounts[2]) | |
250 | 254 | invoke(achievements, "add", [prizesAchievementsIds[2], achievementAmount], nil) | |
251 | 255 | } | |
252 | 256 | else 0 | |
253 | 257 | if ((inv2 == inv2)) | |
254 | 258 | then { | |
255 | 259 | let inv3 = if ((newPrizesAmounts[3] != prizesAmounts[3])) | |
256 | 260 | then { | |
257 | 261 | let achievementAmount = (newPrizesAmounts[3] - prizesAmounts[3]) | |
258 | 262 | invoke(achievements, "add", [prizesAchievementsIds[3], achievementAmount], nil) | |
259 | 263 | } | |
260 | 264 | else 0 | |
261 | 265 | if ((inv3 == inv3)) | |
262 | 266 | then { | |
263 | 267 | let inv4 = if ((newPrizesAmounts[4] != prizesAmounts[4])) | |
264 | 268 | then { | |
265 | 269 | let achievementAmount = (newPrizesAmounts[4] - prizesAmounts[4]) | |
266 | 270 | invoke(achievements, "add", [prizesAchievementsIds[4], achievementAmount], nil) | |
267 | 271 | } | |
268 | 272 | else 0 | |
269 | 273 | if ((inv4 == inv4)) | |
270 | 274 | then { | |
271 | 275 | let baseEntry = [IntegerEntry(keyTotalBurned, newTotalBurned), IntegerEntry((toString(i.caller) + keyUserTotalBurned), (userTotalBurned + pmtAmount)), StringEntry(keyPrizesAmounts, newPrizesAmountsStr)] | |
272 | 276 | let oldLevel = calcLevel(userTotalBurned) | |
273 | 277 | let newLevel = calcLevel(newTotalBurned) | |
274 | 278 | let levelDiff = (newLevel - oldLevel) | |
275 | 279 | if ((levelDiff > 0)) | |
276 | 280 | then { | |
277 | 281 | let inv5 = if ((levelDiff == 1)) | |
278 | 282 | then invoke(achievements, "add", [levelAchievementsIds[(newLevel - 1)], 1], nil) | |
279 | 283 | else 0 | |
280 | 284 | if ((inv5 == inv5)) | |
281 | 285 | then { | |
282 | 286 | let inv6 = if ((levelDiff >= 2)) | |
283 | 287 | then invoke(achievements, "add", [levelAchievementsIds[(newLevel - 2)], 1], nil) | |
284 | 288 | else 0 | |
285 | 289 | if ((inv6 == inv6)) | |
286 | 290 | then { | |
287 | 291 | let inv7 = if ((levelDiff >= 3)) | |
288 | 292 | then invoke(achievements, "add", [levelAchievementsIds[(newLevel - 3)], 1], nil) | |
289 | 293 | else 0 | |
290 | 294 | if ((inv7 == inv7)) | |
291 | 295 | then { | |
292 | 296 | let inv8 = if ((levelDiff == 4)) | |
293 | 297 | then invoke(achievements, "add", [levelAchievementsIds[(newLevel - 4)], 1], nil) | |
294 | 298 | else 0 | |
295 | 299 | if ((inv8 == inv8)) | |
296 | 300 | then baseEntry | |
297 | 301 | else throw("Strict value is not equal to itself.") | |
298 | 302 | } | |
299 | 303 | else throw("Strict value is not equal to itself.") | |
300 | 304 | } | |
301 | 305 | else throw("Strict value is not equal to itself.") | |
302 | 306 | } | |
303 | 307 | else throw("Strict value is not equal to itself.") | |
304 | 308 | } | |
305 | 309 | else baseEntry | |
306 | 310 | } | |
307 | 311 | else throw("Strict value is not equal to itself.") | |
308 | 312 | } | |
309 | 313 | else throw("Strict value is not equal to itself.") | |
310 | 314 | } | |
311 | 315 | else throw("Strict value is not equal to itself.") | |
312 | 316 | } | |
313 | 317 | else throw("Strict value is not equal to itself.") | |
314 | 318 | } | |
315 | 319 | else throw("Strict value is not equal to itself.") | |
316 | 320 | } | |
317 | 321 | } | |
318 | 322 | ||
319 | 323 | ||
320 | 324 | ||
321 | 325 | @Callable(i) | |
322 | 326 | func hashingRandom (hash) = if (!(isActive)) | |
323 | 327 | then throw("DApp is inactive at this moment") | |
324 | 328 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
325 | 329 | then throw("Only admin can call this function") | |
326 | 330 | else [StringEntry(keyVerifyHash, hash)] | |
327 | 331 | ||
328 | 332 | ||
329 | 333 | ||
330 | 334 | @Callable(i) | |
331 | 335 | func finalize (vrfHeight,secretWord) = { | |
332 | 336 | let savedHash = getStringValue(this, keyVerifyHash) | |
333 | 337 | let calcHash = toBase58String(sha256((toBytes(vrfHeight) + toBytes(secretWord)))) | |
334 | 338 | if (!(isActive)) | |
335 | 339 | then throw("DApp is inactive at this moment") | |
336 | 340 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
337 | 341 | then throw("Only admin can call this function") | |
338 | 342 | else if ((calcHash != savedHash)) | |
339 | 343 | then throw("vrf Height hash not matching") | |
340 | 344 | else { | |
341 | 345 | let burnAmount = getIntegerValue(this, keyTotalBurned) | |
342 | 346 | [Burn(swopId, burnAmount), IntegerEntry(keyFinalizeHeight, height)] | |
343 | 347 | } | |
344 | 348 | } | |
345 | 349 | ||
346 | 350 | ||
347 | 351 | ||
348 | 352 | @Callable(i) | |
349 | 353 | func shutdown () = if (!(isActive)) | |
350 | 354 | then throw("DApp already inactive") | |
351 | 355 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
352 | 356 | then throw("Only admin can call this function") | |
353 | 357 | else [BooleanEntry(keyActive, false)] | |
354 | 358 | ||
355 | 359 | ||
356 | 360 | ||
357 | 361 | @Callable(i) | |
358 | 362 | func activate () = if (isActive) | |
359 | 363 | then throw("DApp already active") | |
360 | 364 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
361 | 365 | then throw("Only admin can call this function") | |
362 | 366 | else [BooleanEntry(keyActive, true)] | |
363 | 367 | ||
364 | 368 | ||
365 | 369 | @Verifier(tx) | |
366 | 370 | func verify () = { | |
367 | 371 | let multiSignedByAdmins = { | |
368 | 372 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
369 | 373 | then 1 | |
370 | 374 | else 0 | |
371 | 375 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
372 | 376 | then 1 | |
373 | 377 | else 0 | |
374 | 378 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
375 | 379 | then 1 | |
376 | 380 | else 0 | |
377 | 381 | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
378 | 382 | } | |
379 | 383 | let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
380 | 384 | then true | |
381 | 385 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2)) | |
382 | 386 | then true | |
383 | 387 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3)) | |
384 | 388 | then true | |
385 | 389 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyStaking) | |
386 | 390 | match tx { | |
387 | 391 | case _ => | |
388 | 392 | multiSignedByAdmins | |
389 | 393 | } | |
390 | 394 | } | |
391 | 395 |
github/deemru/w8io/169f3d6 48.97 ms ◑