tx · Bc65tasvqBzgZBNL53y671fxuN5akdtb5zW2qAXeyPgm 3N8CfHN33P1djFRuHuKpWqk1eD3fTcgLiNF: -0.01100000 Waves 2022.07.27 22:39 [2158652] smart account 3N8CfHN33P1djFRuHuKpWqk1eD3fTcgLiNF > SELF 0.00000000 Waves
{ "type": 13, "id": "Bc65tasvqBzgZBNL53y671fxuN5akdtb5zW2qAXeyPgm", "fee": 1100000, "feeAssetId": null, "timestamp": 1658950772287, "version": 2, "chainId": 84, "sender": "3N8CfHN33P1djFRuHuKpWqk1eD3fTcgLiNF", "senderPublicKey": "9Cixf6Ljj2pDy8vDfre5oMaGkboXr7bkq3nPRXpAW3gE", "proofs": [ "3c1RpVGxkosB4DBEAzAZC2VYEei8CEFed4Rj3M4E3gmS12woGMASsPKGaLzV4WtAqhgrEcXuxvj7CTxbQrRUG9vV" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEIAAAAIwAAAAAQbW9uc3Rlcklzc3VlRGFwcAEAAAAaAVSeLUQvwrYHvMWFMlJ5AaNU8Zc7GIeqh0IAAAAADGJhYnlEdWNrRGFwcAEAAAAaAVT/n71LNuFfsgEUCmUITMqZ8Wdc2XdwBU0AAAAAEWR1Y2tJbmN1YmF0b3JEYXBwAQAAABoBVG5118zCpG70l2iViI5nbSMXlmLdmNWQSQAAAAAPZHVja0JyZWVkZXJEYXBwAQAAABoBVMJL8Ud4mWLKzpYe/WncKIJl9WGWYXEeEwAAAAAXcG9pbnRzRm9yQmFieUR1Y2tFYXRpbmcAAAAAAAAAAAUAAAAAGHBvaW50c0ZvckFkdWx0RHVja0VhdGluZwAAAAAAAAAABQAAAAAVZXhpc3RpbmdEdWNrUHJlY2lzaW9uAAAAWvMQekAAAQAAABNnZXRNb25zdGVyUG9pbnRzS2V5AAAAAQAAAAltb25zdGVySWQJAAEsAAAAAgUAAAAJbW9uc3RlcklkAgAAAA5fbW9uc3RlclBvaW50cwEAAAAQZ2V0TW9uc3RlclBvaW50cwAAAAEAAAA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AABaQAAAAhwYXltZW50cwAAAAAAAAAAAQkAAAIAAAABAgAAAClCYWQgcGF5bWVudCBhdHRhY2hlZCAoYXNzZXRbc10gb3IgYW1vdW50KQQAAAADcG10CQEAAAAFdmFsdWUAAAABCQAD7AAAAAEJAQAAAAV2YWx1ZQAAAAEICQEAAAAFdmFsdWUAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAAAAAAB2Fzc2V0SWQDCQEAAAAKaXNCYWJ5RHVjawAAAAEIBQAAAANwbXQAAAACaWQJAAROAAAAAgkABE4AAAACCQEAAAAQc2V0TW9uc3RlclBvaW50cwAAAAIFAAAACW1vbnN0ZXJJRAUAAAAXcG9pbnRzRm9yQmFieUR1Y2tFYXRpbmcJAQAAABVzZXRCYWJ5RHVja0VhdGluZ0RhdGEAAAADBQAAAAFpBQAAAAltb25zdGVySUQJAAJYAAAAAQgFAAAAA3BtdAAAAAJpZAkBAAAACGJ1cm5EdWNrAAAAAQgFAAAAA3BtdAAAAAJpZAMJAQAAAAtpc0FkdWx0RHVjawAAAAEIBQAAAANwbXQAAAACaWQJAAROAAAAAgkABE4AAAACCQAETgAAAAIJAQAAABBzZXRNb25zdGVyUG9pbnRzAAAAAgUAAAAJbW9uc3RlcklEBQAAABhwb2ludHNGb3JBZHVsdER1Y2tFYXRpbmcJAQAAABZzZXRBZHVsdER1Y2tFYXRpbmdEYXRhAAAAAwUAAAABaQUAAAAJbW9uc3RlcklECQACWAAAAAEIBQAAAANwbXQAAAACaWQJAQAAABRzZXRNb25zdGVyUmFyaXR5RGF0YQAAAAIFAAAACW1vbnN0ZXJJRAkAAlgAAAABCAUAAAADcG10AAAAAmlkCQEAAAAIYnVybkR1Y2sAAAABCAUAAAADcG10AAAAAmlkCQAAAgAAAAECAAAAGE5vdCBhIGJhYnkgb3IgYWR1bHQgZHVjawAAAACB+9PS", "height": 2158652, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HWmWeM7tq2wUWJjtvi3G5yPt9ge2DgPsxjiST5UV2wFr Next: AekCPsomkJyroVWRfvRd2YN4i1wztgciLu4tX4NnQoMy Diff:
Old | New | Differences | |
---|---|---|---|
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let monsterIssueDapp = base58'3N4LSmPe4zjEW81X1ix6maibiT5HzXrWpTj' | |
5 | 5 | ||
6 | - | let babyDuckDapp = base58' | |
6 | + | let babyDuckDapp = base58'3NDDhSj9Ddd6P9W3s946zqCK41gaQVPGWSQ' | |
7 | 7 | ||
8 | 8 | let duckIncubatorDapp = base58'3Myz9GtrZ8K6kbSPSDzd5G4wBjuEDVHLFQc' | |
9 | 9 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let monsterIssueDapp = base58'3N4LSmPe4zjEW81X1ix6maibiT5HzXrWpTj' | |
5 | 5 | ||
6 | - | let babyDuckDapp = base58' | |
6 | + | let babyDuckDapp = base58'3NDDhSj9Ddd6P9W3s946zqCK41gaQVPGWSQ' | |
7 | 7 | ||
8 | 8 | let duckIncubatorDapp = base58'3Myz9GtrZ8K6kbSPSDzd5G4wBjuEDVHLFQc' | |
9 | 9 | ||
10 | 10 | let duckBreederDapp = base58'3N7dRqiJCdAB5AWqc6oKW3gH1SEhzzfMm3G' | |
11 | 11 | ||
12 | 12 | let pointsForBabyDuckEating = 5 | |
13 | 13 | ||
14 | 14 | let pointsForAdultDuckEating = 5 | |
15 | 15 | ||
16 | 16 | let existingDuckPrecision = 100000000000000 | |
17 | 17 | ||
18 | 18 | func getMonsterPointsKey (monsterId) = (monsterId + "_monsterPoints") | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func getMonsterPoints (monsterId) = valueOrElse(getInteger(this, getMonsterPointsKey(monsterId)), 0) | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func isValidMonster (monsterId) = { | |
25 | 25 | let result = match assetInfo(fromBase58String(monsterId)) { | |
26 | 26 | case asset: Asset => | |
27 | 27 | (asset.issuer.bytes == monsterIssueDapp) | |
28 | 28 | case _ => | |
29 | 29 | false | |
30 | 30 | } | |
31 | 31 | result | |
32 | 32 | } | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | func keyDucklingLevel (ducklingId) = (("duckling_" + ducklingId) + "_level") | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | func getCurrentLevelBigInt (ducklingId) = { | |
39 | 39 | let kDuckLevel = keyDucklingLevel(ducklingId) | |
40 | 40 | match getString(Address(babyDuckDapp), kDuckLevel) { | |
41 | 41 | case s: String => | |
42 | 42 | parseBigIntValue(s) | |
43 | 43 | case _ => | |
44 | 44 | match getBoolean((("duckling_" + ducklingId) + "_issuedByFeedCall")) { | |
45 | 45 | case b: Boolean => | |
46 | 46 | toBigInt(0) | |
47 | 47 | case _ => | |
48 | 48 | toBigInt((20 * existingDuckPrecision)) | |
49 | 49 | } | |
50 | 50 | } | |
51 | 51 | } | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func getRandomNumber (i) = { | |
55 | 55 | let randomSeedBlock = value(blockInfoByHeight(lastBlock.height)) | |
56 | 56 | let randomHash = sha256_16Kb((i.transactionId + value(randomSeedBlock.vrf))) | |
57 | 57 | (toInt(randomHash, lastBlock.timestamp) % lastBlock.height) | |
58 | 58 | } | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func isGrownBaby (duckId) = { | |
62 | 62 | let currentLevet = getCurrentLevelBigInt(toBase58String(duckId)) | |
63 | 63 | (currentLevet > toBigInt(20)) | |
64 | 64 | } | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func isBabyDuck (duckId) = { | |
68 | 68 | let result = match assetInfo(duckId) { | |
69 | 69 | case asset: Asset => | |
70 | 70 | (asset.issuer.bytes == babyDuckDapp) | |
71 | 71 | case _ => | |
72 | 72 | false | |
73 | 73 | } | |
74 | 74 | if (result) | |
75 | 75 | then isGrownBaby(duckId) | |
76 | 76 | else false | |
77 | 77 | } | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func isAdultDuck (duckId) = { | |
81 | 81 | let result = match assetInfo(duckId) { | |
82 | 82 | case asset: Asset => | |
83 | 83 | if ((asset.issuer.bytes == duckIncubatorDapp)) | |
84 | 84 | then true | |
85 | 85 | else (asset.issuer.bytes == duckBreederDapp) | |
86 | 86 | case _ => | |
87 | 87 | false | |
88 | 88 | } | |
89 | 89 | result | |
90 | 90 | } | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func isJackpotDuck (duckId) = { | |
94 | 94 | let result = match assetInfo(duckId) { | |
95 | 95 | case asset: Asset => | |
96 | 96 | (asset.issuer.bytes == duckIncubatorDapp) | |
97 | 97 | case _ => | |
98 | 98 | false | |
99 | 99 | } | |
100 | 100 | true | |
101 | 101 | } | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func setMonsterPoints (monsterId,points) = [IntegerEntry(getMonsterPointsKey(monsterId), (getMonsterPoints(monsterId) + points))] | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func setBabyDuckEatingData (i,monsterId,duckId) = [StringEntry((((toBase58String(i.transactionId) + "_") + monsterId) + "_BABYDUCK_EAT_BY"), duckId)] | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func setAdultDuckEatingData (i,monsterId,duckId) = [StringEntry((((toBase58String(i.transactionId) + "_") + monsterId) + "_ADULTDUCK_EAT_BY"), duckId)] | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func burnDuck (duckId) = [Burn(duckId, 1)] | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func setMonsterRarityData (monsterId,duckId) = { | |
117 | 117 | let a = 0 | |
118 | 118 | [StringEntry((((duckId + "_") + monsterId) + "_GOT_ABILITY_BY_EATING"), "Ability-x")] | |
119 | 119 | } | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func getAmountOrClear (amount) = if (contains(amount, "0")) | |
123 | 123 | then "" | |
124 | 124 | else amount | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func isSymbolA (accumulated,sym) = if ((sym == "A")) | |
128 | 128 | then (accumulated + 1) | |
129 | 129 | else (accumulated + 0) | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func isSymbolB (accumulated,sym) = if ((sym == "B")) | |
133 | 133 | then (accumulated + 1) | |
134 | 134 | else (accumulated + 0) | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func isSymbolC (accumulated,sym) = if ((sym == "C")) | |
138 | 138 | then (accumulated + 1) | |
139 | 139 | else (accumulated + 0) | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | func isSymbolD (accumulated,sym) = if ((sym == "D")) | |
143 | 143 | then (accumulated + 1) | |
144 | 144 | else (accumulated + 0) | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func isSymbolE (accumulated,sym) = if ((sym == "E")) | |
148 | 148 | then (accumulated + 1) | |
149 | 149 | else (accumulated + 0) | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | func isSymbolF (accumulated,sym) = if ((sym == "F")) | |
153 | 153 | then (accumulated + 1) | |
154 | 154 | else (accumulated + 0) | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | func isSymbolG (accumulated,sym) = if ((sym == "G")) | |
158 | 158 | then (accumulated + 1) | |
159 | 159 | else (accumulated + 0) | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func isSymbolH (accumulated,sym) = if ((sym == "H")) | |
163 | 163 | then (accumulated + 1) | |
164 | 164 | else (accumulated + 0) | |
165 | 165 | ||
166 | 166 | ||
167 | 167 | func isSymbolI (accumulated,sym) = if ((sym == "I")) | |
168 | 168 | then (accumulated + 1) | |
169 | 169 | else (accumulated + 0) | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | func getGen (assetName) = { | |
173 | 173 | let genotype = split(dropRight(drop(assetName, 5), 3), "") | |
174 | 174 | ((((((((getAmountOrClear((toString({ | |
175 | 175 | let $l = genotype | |
176 | 176 | let $s = size($l) | |
177 | 177 | let $acc0 = 0 | |
178 | 178 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
179 | 179 | then $a | |
180 | 180 | else isSymbolA($a, $l[$i]) | |
181 | 181 | ||
182 | 182 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
183 | 183 | then $a | |
184 | 184 | else throw("List size exceeds 8") | |
185 | 185 | ||
186 | 186 | $f0_2($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) | |
187 | 187 | }) + "A")) + getAmountOrClear((toString({ | |
188 | 188 | let $l = genotype | |
189 | 189 | let $s = size($l) | |
190 | 190 | let $acc0 = 0 | |
191 | 191 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
192 | 192 | then $a | |
193 | 193 | else isSymbolB($a, $l[$i]) | |
194 | 194 | ||
195 | 195 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
196 | 196 | then $a | |
197 | 197 | else throw("List size exceeds 8") | |
198 | 198 | ||
199 | 199 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8) | |
200 | 200 | }) + "B"))) + getAmountOrClear((toString({ | |
201 | 201 | let $l = genotype | |
202 | 202 | let $s = size($l) | |
203 | 203 | let $acc0 = 0 | |
204 | 204 | func $f2_1 ($a,$i) = if (($i >= $s)) | |
205 | 205 | then $a | |
206 | 206 | else isSymbolC($a, $l[$i]) | |
207 | 207 | ||
208 | 208 | func $f2_2 ($a,$i) = if (($i >= $s)) | |
209 | 209 | then $a | |
210 | 210 | else throw("List size exceeds 8") | |
211 | 211 | ||
212 | 212 | $f2_2($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8) | |
213 | 213 | }) + "C"))) + getAmountOrClear((toString({ | |
214 | 214 | let $l = genotype | |
215 | 215 | let $s = size($l) | |
216 | 216 | let $acc0 = 0 | |
217 | 217 | func $f3_1 ($a,$i) = if (($i >= $s)) | |
218 | 218 | then $a | |
219 | 219 | else isSymbolD($a, $l[$i]) | |
220 | 220 | ||
221 | 221 | func $f3_2 ($a,$i) = if (($i >= $s)) | |
222 | 222 | then $a | |
223 | 223 | else throw("List size exceeds 8") | |
224 | 224 | ||
225 | 225 | $f3_2($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8) | |
226 | 226 | }) + "D"))) + getAmountOrClear((toString({ | |
227 | 227 | let $l = genotype | |
228 | 228 | let $s = size($l) | |
229 | 229 | let $acc0 = 0 | |
230 | 230 | func $f4_1 ($a,$i) = if (($i >= $s)) | |
231 | 231 | then $a | |
232 | 232 | else isSymbolE($a, $l[$i]) | |
233 | 233 | ||
234 | 234 | func $f4_2 ($a,$i) = if (($i >= $s)) | |
235 | 235 | then $a | |
236 | 236 | else throw("List size exceeds 8") | |
237 | 237 | ||
238 | 238 | $f4_2($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8) | |
239 | 239 | }) + "E"))) + getAmountOrClear((toString({ | |
240 | 240 | let $l = genotype | |
241 | 241 | let $s = size($l) | |
242 | 242 | let $acc0 = 0 | |
243 | 243 | func $f5_1 ($a,$i) = if (($i >= $s)) | |
244 | 244 | then $a | |
245 | 245 | else isSymbolF($a, $l[$i]) | |
246 | 246 | ||
247 | 247 | func $f5_2 ($a,$i) = if (($i >= $s)) | |
248 | 248 | then $a | |
249 | 249 | else throw("List size exceeds 8") | |
250 | 250 | ||
251 | 251 | $f5_2($f5_1($f5_1($f5_1($f5_1($f5_1($f5_1($f5_1($f5_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8) | |
252 | 252 | }) + "F"))) + getAmountOrClear((toString({ | |
253 | 253 | let $l = genotype | |
254 | 254 | let $s = size($l) | |
255 | 255 | let $acc0 = 0 | |
256 | 256 | func $f6_1 ($a,$i) = if (($i >= $s)) | |
257 | 257 | then $a | |
258 | 258 | else isSymbolG($a, $l[$i]) | |
259 | 259 | ||
260 | 260 | func $f6_2 ($a,$i) = if (($i >= $s)) | |
261 | 261 | then $a | |
262 | 262 | else throw("List size exceeds 8") | |
263 | 263 | ||
264 | 264 | $f6_2($f6_1($f6_1($f6_1($f6_1($f6_1($f6_1($f6_1($f6_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8) | |
265 | 265 | }) + "G"))) + getAmountOrClear((toString({ | |
266 | 266 | let $l = genotype | |
267 | 267 | let $s = size($l) | |
268 | 268 | let $acc0 = 0 | |
269 | 269 | func $f7_1 ($a,$i) = if (($i >= $s)) | |
270 | 270 | then $a | |
271 | 271 | else isSymbolH($a, $l[$i]) | |
272 | 272 | ||
273 | 273 | func $f7_2 ($a,$i) = if (($i >= $s)) | |
274 | 274 | then $a | |
275 | 275 | else throw("List size exceeds 8") | |
276 | 276 | ||
277 | 277 | $f7_2($f7_1($f7_1($f7_1($f7_1($f7_1($f7_1($f7_1($f7_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8) | |
278 | 278 | }) + "H"))) + getAmountOrClear((toString({ | |
279 | 279 | let $l = genotype | |
280 | 280 | let $s = size($l) | |
281 | 281 | let $acc0 = 0 | |
282 | 282 | func $f8_1 ($a,$i) = if (($i >= $s)) | |
283 | 283 | then $a | |
284 | 284 | else isSymbolI($a, $l[$i]) | |
285 | 285 | ||
286 | 286 | func $f8_2 ($a,$i) = if (($i >= $s)) | |
287 | 287 | then $a | |
288 | 288 | else throw("List size exceeds 8") | |
289 | 289 | ||
290 | 290 | $f8_2($f8_1($f8_1($f8_1($f8_1($f8_1($f8_1($f8_1($f8_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8) | |
291 | 291 | }) + "I"))) | |
292 | 292 | } | |
293 | 293 | ||
294 | 294 | ||
295 | 295 | func getAssetOrigin (generation) = if ((generation == "G")) | |
296 | 296 | then duckIncubatorDapp | |
297 | 297 | else duckBreederDapp | |
298 | 298 | ||
299 | 299 | ||
300 | 300 | func getAssetRarity (genotype,generation) = { | |
301 | 301 | let quantity = getIntegerValue(Address(getAssetOrigin(generation)), (("stats_" + genotype) + "_quantity")) | |
302 | 302 | let power = pow((10000 / quantity), 4, 5, 1, 2, FLOOR) | |
303 | 303 | if ((power > 0)) | |
304 | 304 | then power | |
305 | 305 | else 2 | |
306 | 306 | } | |
307 | 307 | ||
308 | 308 | ||
309 | 309 | @Callable(i) | |
310 | 310 | func duckEating (monsterID) = if (!(isValidMonster(monsterID))) | |
311 | 311 | then throw("This is not a valid Monster") | |
312 | 312 | else if ((size(i.payments) != 1)) | |
313 | 313 | then throw("Bad payment attached (asset[s] or amount)") | |
314 | 314 | else { | |
315 | 315 | let pmt = value(assetInfo(value(value(i.payments[0]).assetId))) | |
316 | 316 | if (isBabyDuck(pmt.id)) | |
317 | 317 | then ((setMonsterPoints(monsterID, pointsForBabyDuckEating) ++ setBabyDuckEatingData(i, monsterID, toBase58String(pmt.id))) ++ burnDuck(pmt.id)) | |
318 | 318 | else if (isAdultDuck(pmt.id)) | |
319 | 319 | then (((setMonsterPoints(monsterID, pointsForAdultDuckEating) ++ setAdultDuckEatingData(i, monsterID, toBase58String(pmt.id))) ++ setMonsterRarityData(monsterID, toBase58String(pmt.id))) ++ burnDuck(pmt.id)) | |
320 | 320 | else throw("Not a baby or adult duck") | |
321 | 321 | } | |
322 | 322 | ||
323 | 323 |
github/deemru/w8io/026f985 51.50 ms ◑