tx · 56XrT1RJsvEiWBSyi8XFbe73xbnuVTuEp1weMNWgpuSj 3N6PvAL6whpaLE48xjeZbmU7vRWQmuz8AA5: -0.01800000 Waves 2024.11.14 21:51 [3371500] smart account 3N6PvAL6whpaLE48xjeZbmU7vRWQmuz8AA5 > SELF 0.00000000 Waves
{ "type": 13, "id": "56XrT1RJsvEiWBSyi8XFbe73xbnuVTuEp1weMNWgpuSj", "fee": 1800000, "feeAssetId": null, "timestamp": 1731610351463, "version": 2, "chainId": 84, "sender": "3N6PvAL6whpaLE48xjeZbmU7vRWQmuz8AA5", "senderPublicKey": "3ZB9kd3fTB7j5xvuxZe67A7aT4cNTs2gUk1tyFaCdWJ6", "proofs": [ "4aNKo7BWD62jzpsMGp5u4HbGKLKDduDTTpH58GNZDr4jGFzQDCZqvieadMgQ8t99x1YrK96wzXmf5ijCuyCTSp3M" ], "script": "base64:BgIWCAISAwoBCBIDCgEIEgMKAQgSAwoBCDABFHRyeUdldFN0cmluZ0V4dGVybmFsAgdhZGRyZXNzA2tleQQHJG1hdGNoMAkAnQgCBQdhZGRyZXNzBQNrZXkDCQABAgUHJG1hdGNoMAIGU3RyaW5nBAFhBQckbWF0Y2gwBQFhAgABEXRyeUdldEludEV4dGVybmFsAgdhZGRyZXNzA2tleQQHJG1hdGNoMAkAmggCBQdhZGRyZXNzBQNrZXkDCQABAgUHJG1hdGNoMAIDSW50BAFhBQckbWF0Y2gwBQFhCQACAQIbUlRHSUU6IFNvbWV0aGluZyB3ZW50IHdyb25nAQlhc0Jvb2xlYW4BBXZhbHVlBAckbWF0Y2gwBQV2YWx1ZQMJAAECBQckbWF0Y2gwAgdCb29sZWFuBAdib29sZWFuBQckbWF0Y2gwBQdib29sZWFuCQACAQIiRkFCOiB3cm9uZyB0eXBlLCBleHBlY3RlZDogQm9vbGVhbgEMdHJ5R2V0U3RyaW5nAQNrZXkJARR0cnlHZXRTdHJpbmdFeHRlcm5hbAIFBHRoaXMFA2tleQAQZGVsYXlGb3JIYXR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keUteUNhYTISrY65+hhZUZ0tU0k2w9Cj96hgGTtOBA9maXJzdFVzZXJTaWduZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQlmaXJzdFVzZXIAAQMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAEFCWZpcnN0VXNlcgABAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAgUJZmlyc3RVc2VyAAEAAAQQc2Vjb25kVXNlclNpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFCnNlY29uZFVzZXIAAQMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAEFCnNlY29uZFVzZXIAAQMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAIFCnNlY29uZFVzZXIAAQAABA90aGlyZFVzZXJTaWduZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQl0aGlyZFVzZXIAAQMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAEFCXRoaXJkVXNlcgABAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAgUJdGhpcmRVc2VyAAEAAAQPc2lnbmF0dXJlc0NvdW50CQBkAgkAZAIFD2ZpcnN0VXNlclNpZ25lZAUQc2Vjb25kVXNlclNpZ25lZAUPdGhpcmRVc2VyU2lnbmVkBAckbWF0Y2gwBQJ0eAkAZwIFD3NpZ25hdHVyZXNDb3VudAACWxYiOA==", "height": 3371500, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: A7iMdoRVk2SCwHCwEtQqb4TgepQuKq9Zj6NKAdPJD6Sb Next: none Diff:
Old | New | Differences | |
---|---|---|---|
186 | 186 | ||
187 | 187 | ||
188 | 188 | func getRandomWin (tx,finishHeight,assetRarity) = { | |
189 | - | let jackpotRandom = getRandomNumber( | |
189 | + | let jackpotRandom = getRandomNumber(200, tx, finishHeight, 1) | |
190 | 190 | if ((jackpotRandom == 1)) | |
191 | 191 | then "phoenix" | |
192 | 192 | else { | |
193 | 193 | let n = getRandomNumber(1000, tx, finishHeight, 0) | |
194 | - | if ((10 > n)) | |
195 | - | then "item!ART-FREEGENE" | |
196 | - | else if ((126 > n)) | |
197 | - | then "ar" | |
198 | - | else if ((186 > n)) | |
199 | - | then "item!ART-FIRE_ARMOUR" | |
200 | - | else if ((206 > n)) | |
201 | - | then "item!ART-FEED5" | |
202 | - | else if ((226 > n)) | |
203 | - | then "item!ART-FEED10" | |
204 | - | else if ((246 > n)) | |
205 | - | then "item!ART-FEED15" | |
206 | - | else if ((266 > n)) | |
207 | - | then "item!ART-FEED20" | |
208 | - | else if ((286 > n)) | |
209 | - | then "item!ART-FEED25" | |
210 | - | else if ((296 > n)) | |
211 | - | then "item!ART-FEED50" | |
212 | - | else if ((300 > n)) | |
213 | - | then "item!ART-FEED100" | |
214 | - | else if ((310 > n)) | |
215 | - | then "item!ART-CROWN" | |
216 | - | else if ((350 > n)) | |
217 | - | then "incubator" | |
218 | - | else if ((460 > n)) | |
219 | - | then if ((50 > assetRarity)) | |
220 | - | then "item!ART-BUILTBODY" | |
221 | - | else "item!ART-MUTARIUM-D" | |
222 | - | else if ((480 > n)) | |
223 | - | then "item!ART-SNAKE" | |
224 | - | else if ((510 > n)) | |
225 | - | then "item!ART-ROBODUCK" | |
226 | - | else if ((600 > n)) | |
227 | - | then "item!ART-KATANA" | |
228 | - | else if ((650 > n)) | |
229 | - | then if ((50 > assetRarity)) | |
230 | - | then "item!ART-SCEPTER" | |
231 | - | else "item!ART-MUTARIUM-D" | |
232 | - | else if ((710 > n)) | |
233 | - | then "item!ART-MUTARIUM-D" | |
234 | - | else if ((720 > n)) | |
235 | - | then "item!ART-MUTARIUM-G" | |
236 | - | else if ((890 > n)) | |
237 | - | then "duckling_10" | |
238 | - | else if ((960 > n)) | |
239 | - | then "duckling_20" | |
240 | - | else "duckling_40" | |
194 | + | if ((500 > n)) | |
195 | + | then "item!ART-MUTARIUM-D" | |
196 | + | else "item!ART-MUTARIUM-G" | |
241 | 197 | } | |
242 | 198 | } | |
243 | 199 | ||
450 | 406 | else 0 | |
451 | 407 | if ((payment == payment)) | |
452 | 408 | then { | |
453 | - | let $ | |
454 | - | let gen = $ | |
455 | - | let rarity = $ | |
409 | + | let $t01275612805 = getAssetFarmingPower(assetId) | |
410 | + | let gen = $t01275612805._1 | |
411 | + | let rarity = $t01275612805._2 | |
456 | 412 | let call = invoke(getOrigin(assetId), "reduceRarity", [toBase58String(assetId), gen], nil) | |
457 | 413 | if ((call == call)) | |
458 | 414 | then ([IntegerEntry((((("address_" + address) + "_initTx_") + initTx) + "_finishBlock"), (height + delayForHatching)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_status"), "open"), IntegerEntry((((("address_" + address) + "_initTx_") + initTx) + "_assetRarity"), rarity), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_assetId"), toBase58String(assetId))] ++ validPayment) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func tryGetStringExternal (address,key) = match getString(address, key) { | |
5 | 5 | case a: String => | |
6 | 6 | a | |
7 | 7 | case _ => | |
8 | 8 | "" | |
9 | 9 | } | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | func tryGetIntExternal (address,key) = match getInteger(address, key) { | |
13 | 13 | case a: Int => | |
14 | 14 | a | |
15 | 15 | case _ => | |
16 | 16 | throw("RTGIE: Something went wrong") | |
17 | 17 | } | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func asBoolean (value) = match value { | |
21 | 21 | case boolean: Boolean => | |
22 | 22 | boolean | |
23 | 23 | case _ => | |
24 | 24 | throw("FAB: wrong type, expected: Boolean") | |
25 | 25 | } | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func tryGetString (key) = tryGetStringExternal(this, key) | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | let delayForHatching = 2 | |
32 | 32 | ||
33 | 33 | func staticKey_oracleAddress () = "static_oracleAddress" | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func staticKey_eggAssetId () = "static_eggAssetId" | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func staticKey_incubatorAddress () = "static_incubatorAddress" | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func staticKey_breederAddress () = "static_breederAddress" | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func staticKey_farmingAddress () = "static_farmingAddressNew" | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func staticKey_babyDuckAddress () = "static_babyDuckAddress" | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func staticKey_gameDappAddress () = "static_gameDappAddress" | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func staticKey_itemsAddress () = "static_itemsAddress" | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func staticKey_couponsAddress () = "static_couponsAddress" | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func staticKey_huntAddress () = "static_huntAddress" | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func staticKey_burnAddress () = "static_burnAddress" | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func staticKey_refContractAddress () = "static_refContractAddress" | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func staticKey_extraFee () = "static_extraFee" | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func staticKey_feeAggregator () = "static_feeAggregator" | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func getOracle () = Address(fromBase58String(tryGetString(staticKey_oracleAddress()))) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func getEggAssetId () = fromBase58String(tryGetStringExternal(getOracle(), staticKey_eggAssetId())) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func getIncubatorAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_incubatorAddress()))) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func getBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_breederAddress()))) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func getFarmingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_farmingAddress()))) | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func getBabyDuckAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_babyDuckAddress()))) | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func getGameDappAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_gameDappAddress()))) | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func getItemsAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_itemsAddress()))) | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func getCouponsAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_couponsAddress()))) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func getHuntAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_huntAddress()))) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func getBurnAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_burnAddress()))) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func getRefContractAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_refContractAddress()))) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func getFeeAggregator () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_feeAggregator()))) | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func checkAdditionalPayment (payment) = if (isDefined(payment.assetId)) | |
115 | 115 | then throw("RCAP: Please attach waves") | |
116 | 116 | else { | |
117 | 117 | let feeAmount = getIntegerValue(getOracle(), staticKey_extraFee()) | |
118 | 118 | if ((payment.amount != feeAmount)) | |
119 | 119 | then throw((("RCAP: Please attach exactly " + toString(feeAmount)) + " amount of wavelets")) | |
120 | 120 | else [ScriptTransfer(getFeeAggregator(), feeAmount, unit)] | |
121 | 121 | } | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | let PHOENIXBASEOPTIONS = 1000 | |
125 | 125 | ||
126 | 126 | func tryGetInteger (key) = match getInteger(this, key) { | |
127 | 127 | case b: Int => | |
128 | 128 | b | |
129 | 129 | case _ => | |
130 | 130 | 0 | |
131 | 131 | } | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func asString (value) = match value { | |
135 | 135 | case s: String => | |
136 | 136 | s | |
137 | 137 | case s: Int => | |
138 | 138 | throw("wrong type, expected: String, got: Int") | |
139 | 139 | case s: Unit => | |
140 | 140 | throw("wrong type, expected: String, got: Unit") | |
141 | 141 | case _ => | |
142 | 142 | throw("wrong type, expected: String") | |
143 | 143 | } | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | let feeAmount = tryGetInteger("currentPrice") | |
147 | 147 | ||
148 | 148 | func getAmountOrClear (amount) = if (contains(amount, "0")) | |
149 | 149 | then "" | |
150 | 150 | else amount | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func getAssetOrigin (generation) = if ((generation == "G")) | |
154 | 154 | then getIncubatorAddress() | |
155 | 155 | else getBreederAddress() | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func getAssetRarity (genotype,generation) = { | |
159 | 159 | let quantity = getIntegerValue(getAssetOrigin(generation), (("stats_" + genotype) + "_quantity")) | |
160 | 160 | let power = pow((10000 / quantity), 4, 5, 1, 2, FLOOR) | |
161 | 161 | if ((power > 0)) | |
162 | 162 | then power | |
163 | 163 | else 2 | |
164 | 164 | } | |
165 | 165 | ||
166 | 166 | ||
167 | 167 | func getAssetFarmingPower (assetId) = if (if ((value(assetInfo(assetId)).issuer == getBreederAddress())) | |
168 | 168 | then true | |
169 | 169 | else (value(assetInfo(assetId)).issuer == getIncubatorAddress())) | |
170 | 170 | then { | |
171 | 171 | let assetName = value(assetInfo(assetId)).name | |
172 | 172 | let generation = take(takeRight(assetName, 2), 1) | |
173 | 173 | let farmGen = asString(invoke(getBreederAddress(), "getGenFromName", [assetName], nil)) | |
174 | 174 | if ((farmGen == farmGen)) | |
175 | 175 | then $Tuple2(farmGen, getAssetRarity(farmGen, generation)) | |
176 | 176 | else throw("Strict value is not equal to itself.") | |
177 | 177 | } | |
178 | 178 | else throw("not valid NFT") | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | func getRandomNumber (options,txId,hatchingFinishHeight,offset) = { | |
182 | 182 | let randomSeedBlock = value(blockInfoByHeight((hatchingFinishHeight - 1))) | |
183 | 183 | let randomHash = sha256((txId + value(randomSeedBlock.vrf))) | |
184 | 184 | (toInt(randomHash, (offset * 8)) % options) | |
185 | 185 | } | |
186 | 186 | ||
187 | 187 | ||
188 | 188 | func getRandomWin (tx,finishHeight,assetRarity) = { | |
189 | - | let jackpotRandom = getRandomNumber( | |
189 | + | let jackpotRandom = getRandomNumber(200, tx, finishHeight, 1) | |
190 | 190 | if ((jackpotRandom == 1)) | |
191 | 191 | then "phoenix" | |
192 | 192 | else { | |
193 | 193 | let n = getRandomNumber(1000, tx, finishHeight, 0) | |
194 | - | if ((10 > n)) | |
195 | - | then "item!ART-FREEGENE" | |
196 | - | else if ((126 > n)) | |
197 | - | then "ar" | |
198 | - | else if ((186 > n)) | |
199 | - | then "item!ART-FIRE_ARMOUR" | |
200 | - | else if ((206 > n)) | |
201 | - | then "item!ART-FEED5" | |
202 | - | else if ((226 > n)) | |
203 | - | then "item!ART-FEED10" | |
204 | - | else if ((246 > n)) | |
205 | - | then "item!ART-FEED15" | |
206 | - | else if ((266 > n)) | |
207 | - | then "item!ART-FEED20" | |
208 | - | else if ((286 > n)) | |
209 | - | then "item!ART-FEED25" | |
210 | - | else if ((296 > n)) | |
211 | - | then "item!ART-FEED50" | |
212 | - | else if ((300 > n)) | |
213 | - | then "item!ART-FEED100" | |
214 | - | else if ((310 > n)) | |
215 | - | then "item!ART-CROWN" | |
216 | - | else if ((350 > n)) | |
217 | - | then "incubator" | |
218 | - | else if ((460 > n)) | |
219 | - | then if ((50 > assetRarity)) | |
220 | - | then "item!ART-BUILTBODY" | |
221 | - | else "item!ART-MUTARIUM-D" | |
222 | - | else if ((480 > n)) | |
223 | - | then "item!ART-SNAKE" | |
224 | - | else if ((510 > n)) | |
225 | - | then "item!ART-ROBODUCK" | |
226 | - | else if ((600 > n)) | |
227 | - | then "item!ART-KATANA" | |
228 | - | else if ((650 > n)) | |
229 | - | then if ((50 > assetRarity)) | |
230 | - | then "item!ART-SCEPTER" | |
231 | - | else "item!ART-MUTARIUM-D" | |
232 | - | else if ((710 > n)) | |
233 | - | then "item!ART-MUTARIUM-D" | |
234 | - | else if ((720 > n)) | |
235 | - | then "item!ART-MUTARIUM-G" | |
236 | - | else if ((890 > n)) | |
237 | - | then "duckling_10" | |
238 | - | else if ((960 > n)) | |
239 | - | then "duckling_20" | |
240 | - | else "duckling_40" | |
194 | + | if ((500 > n)) | |
195 | + | then "item!ART-MUTARIUM-D" | |
196 | + | else "item!ART-MUTARIUM-G" | |
241 | 197 | } | |
242 | 198 | } | |
243 | 199 | ||
244 | 200 | ||
245 | 201 | func getOrigin (assetId) = { | |
246 | 202 | let assetName = value(assetInfo(assetId)).name | |
247 | 203 | let generation = take(takeRight(assetName, 2), 1) | |
248 | 204 | if (if ((generation == "G")) | |
249 | 205 | then true | |
250 | 206 | else (generation == "J")) | |
251 | 207 | then getIncubatorAddress() | |
252 | 208 | else getBreederAddress() | |
253 | 209 | } | |
254 | 210 | ||
255 | 211 | ||
256 | 212 | func asInt (value) = match value { | |
257 | 213 | case int: Int => | |
258 | 214 | int | |
259 | 215 | case string: String => | |
260 | 216 | throw(("RAI: wrong type, expected: Int, but got: " + string)) | |
261 | 217 | case _ => | |
262 | 218 | throw("RAI: wrong type, expected: Int") | |
263 | 219 | } | |
264 | 220 | ||
265 | 221 | ||
266 | 222 | func getBool (key) = match getBoolean(this, key) { | |
267 | 223 | case b: Boolean => | |
268 | 224 | b | |
269 | 225 | case _ => | |
270 | 226 | false | |
271 | 227 | } | |
272 | 228 | ||
273 | 229 | ||
274 | 230 | func isTestEnv () = getBool("TESTENV") | |
275 | 231 | ||
276 | 232 | ||
277 | 233 | func finishRebirthInternal (initTx,address,payment,double) = { | |
278 | 234 | let finishBlock = tryGetInteger((((("address_" + address) + "_initTx_") + initTx) + "_finishBlock")) | |
279 | 235 | let assetRarity = tryGetInteger((((("address_" + address) + "_initTx_") + initTx) + "_assetRarity")) | |
280 | 236 | let status = tryGetString((((("address_" + address) + "_initTx_") + initTx) + "_status")) | |
281 | 237 | let validPayment = checkAdditionalPayment(payment) | |
282 | 238 | if ((validPayment == validPayment)) | |
283 | 239 | then { | |
284 | 240 | let recordAction = invoke(getCouponsAddress(), "recordAction", ["REBIRTH"], nil) | |
285 | 241 | if ((recordAction == recordAction)) | |
286 | 242 | then { | |
287 | 243 | func getAccessItemAssetId (address) = fromBase58String(tryGetStringExternal(address, "static_accessItemAssetId")) | |
288 | 244 | ||
289 | 245 | func getAccessItemPrice (address) = tryGetIntExternal(address, "static_accessItemPrice") | |
290 | 246 | ||
291 | 247 | if ((status != "open")) | |
292 | 248 | then throw("rebirth is finished or not open") | |
293 | 249 | else if ((finishBlock > height)) | |
294 | 250 | then throw("you cannot finish rebirth, yet") | |
295 | 251 | else { | |
296 | 252 | let win = getRandomWin(fromBase58String(initTx), finishBlock, assetRarity) | |
297 | 253 | let txId = initTx | |
298 | 254 | let result = if ((indexOf(win, "perch") != unit)) | |
299 | 255 | then { | |
300 | 256 | let color = takeRight(win, 1) | |
301 | 257 | let result = if (!(double)) | |
302 | 258 | then { | |
303 | 259 | let first = invoke(getFarmingAddress(), "addFreePerch", [address, color, 1], nil) | |
304 | 260 | if ((first == first)) | |
305 | 261 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first))] | |
306 | 262 | else throw("Strict value is not equal to itself.") | |
307 | 263 | } | |
308 | 264 | else { | |
309 | 265 | let first = invoke(getFarmingAddress(), "addFreePerch", [address, color, 2], nil) | |
310 | 266 | if ((first == first)) | |
311 | 267 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result1"), asString(first)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_win1"), win)] | |
312 | 268 | else throw("Strict value is not equal to itself.") | |
313 | 269 | } | |
314 | 270 | if ((result == result)) | |
315 | 271 | then result | |
316 | 272 | else throw("Strict value is not equal to itself.") | |
317 | 273 | } | |
318 | 274 | else if ((win == "incubator")) | |
319 | 275 | then { | |
320 | 276 | let result = if (!(double)) | |
321 | 277 | then { | |
322 | 278 | let first = invoke(getIncubatorAddress(), "issueFreeDuck", [address, txId], nil) | |
323 | 279 | if ((first == first)) | |
324 | 280 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first))] | |
325 | 281 | else throw("Strict value is not equal to itself.") | |
326 | 282 | } | |
327 | 283 | else { | |
328 | 284 | let first = invoke(getIncubatorAddress(), "issueFreeDuck", [address, txId], nil) | |
329 | 285 | if ((first == first)) | |
330 | 286 | then { | |
331 | 287 | let second = invoke(getBabyDuckAddress(), "issueFreeDuckling", [address, txId, 100], nil) | |
332 | 288 | if ((second == second)) | |
333 | 289 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result1"), asString(second)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_win1"), "duckling_100")] | |
334 | 290 | else throw("Strict value is not equal to itself.") | |
335 | 291 | } | |
336 | 292 | else throw("Strict value is not equal to itself.") | |
337 | 293 | } | |
338 | 294 | if ((result == result)) | |
339 | 295 | then result | |
340 | 296 | else throw("Strict value is not equal to itself.") | |
341 | 297 | } | |
342 | 298 | else if ((win == "ar")) | |
343 | 299 | then { | |
344 | 300 | let assetId = getAccessItemAssetId(getHuntAddress()) | |
345 | 301 | let price = getAccessItemPrice(getHuntAddress()) | |
346 | 302 | let call = invoke(getHuntAddress(), "buyAccessItemOther", [address], [AttachedPayment(assetId, price)]) | |
347 | 303 | if ((call == call)) | |
348 | 304 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(call))] | |
349 | 305 | else throw("Strict value is not equal to itself.") | |
350 | 306 | } | |
351 | 307 | else if ((win == "phoenix")) | |
352 | 308 | then { | |
353 | 309 | let call = invoke(getIncubatorAddress(), "issueJackpot", [address, txId, "WWWWHWTF"], nil) | |
354 | 310 | if ((call == call)) | |
355 | 311 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(call))] | |
356 | 312 | else throw("Strict value is not equal to itself.") | |
357 | 313 | } | |
358 | 314 | else if ((indexOf(win, "duckling") != unit)) | |
359 | 315 | then { | |
360 | 316 | let level = parseIntValue(split(win, "_")[1]) | |
361 | 317 | let levelFinal = if (double) | |
362 | 318 | then (2 * level) | |
363 | 319 | else level | |
364 | 320 | let call = invoke(getBabyDuckAddress(), "issueFreeDuckling", [address, txId, levelFinal], nil) | |
365 | 321 | if ((call == call)) | |
366 | 322 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(call))] | |
367 | 323 | else throw("Strict value is not equal to itself.") | |
368 | 324 | } | |
369 | 325 | else if ((indexOf(win, "item") != unit)) | |
370 | 326 | then { | |
371 | 327 | let itemName = split(win, "!")[1] | |
372 | 328 | let result = if (!(double)) | |
373 | 329 | then { | |
374 | 330 | let first = invoke(getItemsAddress(), "issueArtefactIndex", [itemName, address, 0], nil) | |
375 | 331 | if ((first == first)) | |
376 | 332 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first))] | |
377 | 333 | else throw("Strict value is not equal to itself.") | |
378 | 334 | } | |
379 | 335 | else { | |
380 | 336 | let first = invoke(getItemsAddress(), "issueArtefactIndex", [itemName, address, 0], nil) | |
381 | 337 | if ((first == first)) | |
382 | 338 | then { | |
383 | 339 | let second = invoke(getItemsAddress(), "issueArtefactIndex", [itemName, address, 1], nil) | |
384 | 340 | if ((second == second)) | |
385 | 341 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(second)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_win1"), win)] | |
386 | 342 | else throw("Strict value is not equal to itself.") | |
387 | 343 | } | |
388 | 344 | else throw("Strict value is not equal to itself.") | |
389 | 345 | } | |
390 | 346 | if ((result == result)) | |
391 | 347 | then result | |
392 | 348 | else throw("Strict value is not equal to itself.") | |
393 | 349 | } | |
394 | 350 | else throw("RFB: Some error occured, please contact the admins!") | |
395 | 351 | ((result ++ [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_win"), win), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_status"), "finish")]) ++ validPayment) | |
396 | 352 | } | |
397 | 353 | } | |
398 | 354 | else throw("Strict value is not equal to itself.") | |
399 | 355 | } | |
400 | 356 | else throw("Strict value is not equal to itself.") | |
401 | 357 | } | |
402 | 358 | ||
403 | 359 | ||
404 | 360 | @Callable(i) | |
405 | 361 | func configureOracle (oracle) = if ((i.caller != this)) | |
406 | 362 | then throw("RCU: admin only") | |
407 | 363 | else [StringEntry("static_oracleAddress", oracle)] | |
408 | 364 | ||
409 | 365 | ||
410 | 366 | ||
411 | 367 | @Callable(i) | |
412 | 368 | func initRebirth (refererAddress) = { | |
413 | 369 | let pmt = i.payments[0] | |
414 | 370 | let assetId = value(pmt.assetId) | |
415 | 371 | let initTx = toBase58String(i.transactionId) | |
416 | 372 | let address = toString(i.caller) | |
417 | 373 | if ((pmt.amount != 1)) | |
418 | 374 | then throw("NFT is not attached") | |
419 | 375 | else { | |
420 | 376 | let amountPaidByCoupons = asInt(invoke(getCouponsAddress(), "useCoupons", [feeAmount], nil)) | |
421 | 377 | if ((amountPaidByCoupons == amountPaidByCoupons)) | |
422 | 378 | then { | |
423 | 379 | let leftToPay = (feeAmount - amountPaidByCoupons) | |
424 | 380 | let validPayment = checkAdditionalPayment(i.payments[1]) | |
425 | 381 | if ((validPayment == validPayment)) | |
426 | 382 | then { | |
427 | 383 | let payment = if ((leftToPay != 0)) | |
428 | 384 | then { | |
429 | 385 | let feePayment = value(i.payments[2]) | |
430 | 386 | if ((feePayment.assetId != getEggAssetId())) | |
431 | 387 | then throw("You need to attach EGG tokens as fee") | |
432 | 388 | else if ((leftToPay > feePayment.amount)) | |
433 | 389 | then throw(("You need to attach the following amount of EGG tokens as fee: 0." + toString(leftToPay))) | |
434 | 390 | else { | |
435 | 391 | let refererRewardForPerch = fraction(leftToPay, 5, 100) | |
436 | 392 | let refCall = asBoolean(invoke(getRefContractAddress(), "refPayment", [refererAddress], [AttachedPayment(getEggAssetId(), refererRewardForPerch)])) | |
437 | 393 | if ((refCall == refCall)) | |
438 | 394 | then { | |
439 | 395 | let toBurn = if (refCall) | |
440 | 396 | then (leftToPay - refererRewardForPerch) | |
441 | 397 | else leftToPay | |
442 | 398 | let burnCall = invoke(getBurnAddress(), "burnAttachedPayments", nil, [AttachedPayment(getEggAssetId(), toBurn)]) | |
443 | 399 | if ((burnCall == burnCall)) | |
444 | 400 | then leftToPay | |
445 | 401 | else throw("Strict value is not equal to itself.") | |
446 | 402 | } | |
447 | 403 | else throw("Strict value is not equal to itself.") | |
448 | 404 | } | |
449 | 405 | } | |
450 | 406 | else 0 | |
451 | 407 | if ((payment == payment)) | |
452 | 408 | then { | |
453 | - | let $ | |
454 | - | let gen = $ | |
455 | - | let rarity = $ | |
409 | + | let $t01275612805 = getAssetFarmingPower(assetId) | |
410 | + | let gen = $t01275612805._1 | |
411 | + | let rarity = $t01275612805._2 | |
456 | 412 | let call = invoke(getOrigin(assetId), "reduceRarity", [toBase58String(assetId), gen], nil) | |
457 | 413 | if ((call == call)) | |
458 | 414 | then ([IntegerEntry((((("address_" + address) + "_initTx_") + initTx) + "_finishBlock"), (height + delayForHatching)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_status"), "open"), IntegerEntry((((("address_" + address) + "_initTx_") + initTx) + "_assetRarity"), rarity), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_assetId"), toBase58String(assetId))] ++ validPayment) | |
459 | 415 | else throw("Strict value is not equal to itself.") | |
460 | 416 | } | |
461 | 417 | else throw("Strict value is not equal to itself.") | |
462 | 418 | } | |
463 | 419 | else throw("Strict value is not equal to itself.") | |
464 | 420 | } | |
465 | 421 | else throw("Strict value is not equal to itself.") | |
466 | 422 | } | |
467 | 423 | } | |
468 | 424 | ||
469 | 425 | ||
470 | 426 | ||
471 | 427 | @Callable(i) | |
472 | 428 | func finishRebirth (initTx) = finishRebirthInternal(initTx, toString(i.caller), i.payments[0], false) | |
473 | 429 | ||
474 | 430 | ||
475 | 431 | ||
476 | 432 | @Callable(i) | |
477 | 433 | func finishRebirthDouble (initTx) = if (!(if ((size(i.payments) == 2)) | |
478 | 434 | then (i.payments[0].amount == 1) | |
479 | 435 | else false)) | |
480 | 436 | then throw("Invalid payment") | |
481 | 437 | else { | |
482 | 438 | let assetId = value(i.payments[0].assetId) | |
483 | 439 | let boosterType = asString(invoke(getItemsAddress(), "checkArtefactDetails", [toBase58String(assetId)], nil)) | |
484 | 440 | if ((boosterType == boosterType)) | |
485 | 441 | then if ((boosterType == "ART-GIFT_DOUBL")) | |
486 | 442 | then ([Burn(assetId, 1)] ++ finishRebirthInternal(initTx, toString(i.caller), i.payments[1], true)) | |
487 | 443 | else throw("Error! Wrong item attached to double rewards!") | |
488 | 444 | else throw("Strict value is not equal to itself.") | |
489 | 445 | } | |
490 | 446 | ||
491 | 447 | ||
492 | 448 | @Verifier(tx) | |
493 | 449 | func verify () = if (isTestEnv()) | |
494 | 450 | then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
495 | 451 | else { | |
496 | 452 | let firstUser = base58'6TdaXEfhnjYquvPf3yV7MFxt2CbgFmaqsvGwkKfXtKi4' | |
497 | 453 | let secondUser = base58'7DsP2WaMLocbHuUxux7pbXRjTrrZ1TFQPsi5QumS3gr8' | |
498 | 454 | let thirdUser = base58'BpFWP3p3JgYrrP45xfrKzeMcWMEXoinj4FVPPkUiA8D3' | |
499 | 455 | let firstUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], firstUser)) | |
500 | 456 | then 1 | |
501 | 457 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], firstUser)) | |
502 | 458 | then 1 | |
503 | 459 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], firstUser)) | |
504 | 460 | then 1 | |
505 | 461 | else 0 | |
506 | 462 | let secondUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], secondUser)) | |
507 | 463 | then 1 | |
508 | 464 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], secondUser)) | |
509 | 465 | then 1 | |
510 | 466 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], secondUser)) | |
511 | 467 | then 1 | |
512 | 468 | else 0 | |
513 | 469 | let thirdUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], thirdUser)) | |
514 | 470 | then 1 | |
515 | 471 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], thirdUser)) | |
516 | 472 | then 1 | |
517 | 473 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], thirdUser)) | |
518 | 474 | then 1 | |
519 | 475 | else 0 | |
520 | 476 | let signaturesCount = ((firstUserSigned + secondUserSigned) + thirdUserSigned) | |
521 | 477 | match tx { | |
522 | 478 | case _ => | |
523 | 479 | (signaturesCount >= 2) | |
524 | 480 | } | |
525 | 481 | } | |
526 | 482 |
github/deemru/w8io/026f985 51.27 ms ◑