tx · FuedH1Ww8sf6vetM9UNFy2mwvYmJZQYQTTGeZQa8fp2i 3Mw8EHDvHCbzm6VE777G6EJNQBEe6CeS335: -0.01800000 Waves 2024.12.02 18:20 [3397207] smart account 3Mw8EHDvHCbzm6VE777G6EJNQBEe6CeS335 > SELF 0.00000000 Waves
{ "type": 13, "id": "FuedH1Ww8sf6vetM9UNFy2mwvYmJZQYQTTGeZQa8fp2i", "fee": 1800000, "feeAssetId": null, "timestamp": 1733152855184, "version": 2, "chainId": 84, "sender": "3Mw8EHDvHCbzm6VE777G6EJNQBEe6CeS335", "senderPublicKey": "4f2Ggz6CqZhqr3FaW8dzR6KoddCudvULpuUfh7ew3Yne", "proofs": [ "4orRqf3zJ9QxBzLqfQLYnufh5rcvDUhCx7WuTy9Szwc4wWXvNBb6A6WQmfnoLoqh97bULs8LGHZawakCR6zsUgQS" ], "script": "base64:BgIZCAISAwoBCBIAEgMKAQgSAwoBCBIECgIICCoBFHRyeUdldFN0cmluZ0V4dGVybmFsAgdhZGRyZXNzA2tleQQHJG1hdGNoMAkAnQgCBQdhZGRyZXNzBQNrZXkDCQABAgUHJG1hdGNoMAIGU3RyaW5nBAFhBQckbWF0Y2gwBQFhAgABDXRyeUdldEludGVnZXIBA2tleQQHJG1hdGNoMAkAmggCBQR0aGlzBQNrZXkDCQABAgUHJG1hdGNoMAIDSW50BAFiBQckbWF0Y2gwBQFiAAABDHRyeUdldFN0cmluZwEDa2V5CQEUdHJ5R2V0U3RyaW5nRXh0ZXJuYWwCBQR0aGlzBQNrZXkBBWFzSW50AQV2YWx1ZQQHJG1hdGNoMAUFdmFsdWUDCQABAgUHJG1hdGNoMAIDSW50BANpbnQFByRtYXRjaDAFA2ludAMJAAECBQckbWF0Y2gwAgZTdHJpbmcEBnN0cmluZwUHJG1hdGNoMAkAAgEJAKwCAgIpUkFJOiB3cm9uZyB0eXBlLCBleHBlY3RlZDogSW50LCBidXQgZ290OiAFBnN0cmluZwkAAgECHlJBSTogd3JvbmcgdH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aGlyZFVzZXJTaWduZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQl0aGlyZFVzZXIAAQMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAEFCXRoaXJkVXNlcgABAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAgUJdGhpcmRVc2VyAAEAAAQPc2lnbmF0dXJlc0NvdW50CQBkAgkAZAIFD2ZpcnN0VXNlclNpZ25lZAUQc2Vjb25kVXNlclNpZ25lZAUPdGhpcmRVc2VyU2lnbmVkBAckbWF0Y2gwBQJ0eAkAZwIFD3NpZ25hdHVyZXNDb3VudAABhk67vQ==", "height": 3397207, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AQ4Mo3otUKzLxveu61ZyyEUcyjuodbu4hKtUNiX1bnWi Next: none Diff:
Old | New | Differences | |
---|---|---|---|
178 | 178 | ||
179 | 179 | ||
180 | 180 | func getRandomWin (tx,finishHeight,blacklistCode) = { | |
181 | - | let jackpotRandom = getRandomNumber(200, tx, finishHeight, 1) | |
182 | - | if ((jackpotRandom == 1)) | |
183 | - | then $Tuple2(jackpotRandom, "jackpot") | |
184 | - | else { | |
185 | - | let n = getRandomNumber(1000, tx, finishHeight, 0) | |
186 | - | let result = if (if ((100 > n)) | |
187 | - | then (blacklistCode != "docking_A") | |
188 | - | else false) | |
189 | - | then "docking_A" | |
190 | - | else if (if ((200 > n)) | |
191 | - | then (blacklistCode != "docking_B") | |
192 | - | else false) | |
193 | - | then "docking_B" | |
194 | - | else if (if ((300 > n)) | |
195 | - | then (blacklistCode != "docking_C") | |
196 | - | else false) | |
197 | - | then "docking_C" | |
198 | - | else if (if ((400 > n)) | |
199 | - | then (blacklistCode != "docking_D") | |
200 | - | else false) | |
201 | - | then "docking_D" | |
202 | - | else if (if ((450 > n)) | |
203 | - | then (blacklistCode != "incubator") | |
204 | - | else false) | |
205 | - | then "incubator" | |
206 | - | else if (if ((490 > n)) | |
207 | - | then (blacklistCode != "duckling_40") | |
208 | - | else false) | |
209 | - | then "duckling_40" | |
210 | - | else if (if ((540 > n)) | |
211 | - | then (blacklistCode != "duckling_20") | |
212 | - | else false) | |
213 | - | then "duckling_20" | |
214 | - | else if (if ((640 > n)) | |
215 | - | then (blacklistCode != "item!ART-FEED5") | |
216 | - | else false) | |
217 | - | then "item!ART-FEED5" | |
218 | - | else if (if ((710 > n)) | |
219 | - | then (blacklistCode != "item!ART-FEED10") | |
220 | - | else false) | |
221 | - | then "item!ART-FEED10" | |
222 | - | else if (if ((740 > n)) | |
223 | - | then (blacklistCode != "item!ART-FEED15") | |
224 | - | else false) | |
225 | - | then "item!ART-FEED15" | |
226 | - | else if (if ((770 > n)) | |
227 | - | then (blacklistCode != "item!ART-FEED20") | |
228 | - | else false) | |
229 | - | then "item!ART-FEED20" | |
230 | - | else if (if ((790 > n)) | |
231 | - | then (blacklistCode != "item!ART-FEED25") | |
232 | - | else false) | |
233 | - | then "item!ART-FEED25" | |
234 | - | else if (if ((810 > n)) | |
235 | - | then (blacklistCode != "item!ART-FEED50") | |
236 | - | else false) | |
237 | - | then "item!ART-FEED50" | |
238 | - | else if (if ((830 > n)) | |
239 | - | then (blacklistCode != "item!ART-FEED100") | |
240 | - | else false) | |
241 | - | then "item!ART-FEED100" | |
242 | - | else if (if ((860 > n)) | |
243 | - | then (blacklistCode != "item!ART-MUTARIUM-G") | |
244 | - | else false) | |
245 | - | then "item!ART-MUTARIUM-G" | |
246 | - | else if (if ((890 > n)) | |
247 | - | then (blacklistCode != "item!ART-MUTARIUM-D") | |
248 | - | else false) | |
249 | - | then "item!ART-MUTARIUM-D" | |
250 | - | else if (if ((910 > n)) | |
251 | - | then (blacklistCode != "item!ART-FREEGENE") | |
252 | - | else false) | |
253 | - | then "item!ART-FREEGENE" | |
254 | - | else if (if ((930 > n)) | |
255 | - | then (blacklistCode != "item!ART-FIXGENE") | |
256 | - | else false) | |
257 | - | then "item!ART-FIXGENE" | |
258 | - | else if (if ((980 > n)) | |
259 | - | then (blacklistCode != "trtl_incubator") | |
260 | - | else false) | |
261 | - | then "trtl_incubator" | |
262 | - | else "item!ART-POTION" | |
263 | - | $Tuple2(n, result) | |
264 | - | } | |
181 | + | let n = getRandomNumber(1000, tx, finishHeight, 0) | |
182 | + | let result = "jackpot" | |
183 | + | $Tuple2(n, result) | |
265 | 184 | } | |
266 | 185 | ||
267 | 186 | ||
545 | 464 | let signaturesCount = ((firstUserSigned + secondUserSigned) + thirdUserSigned) | |
546 | 465 | match tx { | |
547 | 466 | case _ => | |
548 | - | (signaturesCount >= | |
467 | + | (signaturesCount >= 1) | |
549 | 468 | } | |
550 | 469 | } | |
551 | 470 |
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 tryGetInteger (key) = match getInteger(this, key) { | |
13 | 13 | case b: Int => | |
14 | 14 | b | |
15 | 15 | case _ => | |
16 | 16 | 0 | |
17 | 17 | } | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func tryGetString (key) = tryGetStringExternal(this, key) | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func asInt (value) = match value { | |
24 | 24 | case int: Int => | |
25 | 25 | int | |
26 | 26 | case string: String => | |
27 | 27 | throw(("RAI: wrong type, expected: Int, but got: " + string)) | |
28 | 28 | case _ => | |
29 | 29 | throw("RAI: wrong type, expected: Int") | |
30 | 30 | } | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func asBoolean (value) = match value { | |
34 | 34 | case boolean: Boolean => | |
35 | 35 | boolean | |
36 | 36 | case _ => | |
37 | 37 | throw("FAB: wrong type, expected: Boolean") | |
38 | 38 | } | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | func getBool (key) = match getBoolean(this, key) { | |
42 | 42 | case b: Boolean => | |
43 | 43 | b | |
44 | 44 | case _ => | |
45 | 45 | false | |
46 | 46 | } | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func asString (value) = match value { | |
50 | 50 | case s: String => | |
51 | 51 | s | |
52 | 52 | case s: Int => | |
53 | 53 | throw("wrong type, expected: String, got: Int") | |
54 | 54 | case s: Unit => | |
55 | 55 | throw("wrong type, expected: String, got: Unit") | |
56 | 56 | case _ => | |
57 | 57 | throw("wrong type, expected: String") | |
58 | 58 | } | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func isTestEnv () = getBool("TESTENV") | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func staticKey_oracleAddress () = "static_oracleAddress" | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func staticKey_extraFee () = "static_extraFee" | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func staticKey_feeAggregator () = "static_feeAggregator" | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func staticKey_canineIncubatorAddress () = "static_canineIncubatorAddress" | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func staticKey_canineBreederAddress () = "static_canineBreederAddress" | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func staticKey_couponsAddress () = "static_couponsAddress" | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func staticKey_canineStakingAddress () = "static_canineStakingAddress" | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func staticKey_duckStakingAddress () = "static_farmingAddressNew" | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func staticKey_duckIncubatorAddress () = "static_incubatorAddress" | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func staticKey_itemsAddress () = "static_itemsAddress" | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func staticKey_canineWavesRebirthPrice () = "static_canineWavesRebirthPrice" | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func staticKey_turtleIncubatorAddress () = "static_turtleIncubatorAddress" | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func staticKey_babyDuckAddress () = "static_babyDuckAddress" | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func getOracle () = Address(fromBase58String(tryGetString(staticKey_oracleAddress()))) | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func getFeeAggregator () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_feeAggregator()))) | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func getCanineBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_canineBreederAddress()))) | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | func getCanineIncubatorAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_canineIncubatorAddress()))) | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | func getCouponsAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_couponsAddress()))) | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | func getCanineStakingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_canineStakingAddress()))) | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func getDuckStakingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_duckStakingAddress()))) | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | func getDuckIncubatorAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_duckIncubatorAddress()))) | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func getItemsAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_itemsAddress()))) | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func getTurtleIncubatorAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_turtleIncubatorAddress()))) | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func getBabyDuckAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_babyDuckAddress()))) | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func tryGetIntegerExternal (address,key) = match getInteger(address, key) { | |
137 | 137 | case b: Int => | |
138 | 138 | b | |
139 | 139 | case _ => | |
140 | 140 | throw("TR: Value not found in sc!") | |
141 | 141 | } | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | let wavesAmount = tryGetIntegerExternal(getOracle(), staticKey_canineWavesRebirthPrice()) | |
145 | 145 | ||
146 | 146 | let delayForHatching = 2 | |
147 | 147 | ||
148 | 148 | func checkReal (assetId) = if (if ((value(assetInfo(assetId)).issuer == getCanineBreederAddress())) | |
149 | 149 | then true | |
150 | 150 | else (value(assetInfo(assetId)).issuer == getCanineIncubatorAddress())) | |
151 | 151 | then value(assetInfo(assetId)).issuer | |
152 | 152 | else throw("not valid NFT") | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | func checkAdditionalPayment (payment) = if (isDefined(payment.assetId)) | |
156 | 156 | then throw("RCAP: Please attach waves") | |
157 | 157 | else { | |
158 | 158 | let feeAmount = getIntegerValue(getOracle(), staticKey_extraFee()) | |
159 | 159 | if ((payment.amount != feeAmount)) | |
160 | 160 | then throw((("RCAP: Please attach exactly " + toString(feeAmount)) + " amount of wavelets")) | |
161 | 161 | else [ScriptTransfer(getFeeAggregator(), feeAmount, unit)] | |
162 | 162 | } | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | func getRandomNumber (options,txId,hatchingFinishHeight,offset) = { | |
166 | 166 | let randomSeedBlock = value(blockInfoByHeight((hatchingFinishHeight - 1))) | |
167 | 167 | let randomHash = sha256((txId + value(randomSeedBlock.vrf))) | |
168 | 168 | (toInt(randomHash, (offset * 8)) % options) | |
169 | 169 | } | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | func tryGetBoolean (key) = match getBoolean(key) { | |
173 | 173 | case b: Boolean => | |
174 | 174 | b | |
175 | 175 | case _ => | |
176 | 176 | false | |
177 | 177 | } | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | func getRandomWin (tx,finishHeight,blacklistCode) = { | |
181 | - | let jackpotRandom = getRandomNumber(200, tx, finishHeight, 1) | |
182 | - | if ((jackpotRandom == 1)) | |
183 | - | then $Tuple2(jackpotRandom, "jackpot") | |
184 | - | else { | |
185 | - | let n = getRandomNumber(1000, tx, finishHeight, 0) | |
186 | - | let result = if (if ((100 > n)) | |
187 | - | then (blacklistCode != "docking_A") | |
188 | - | else false) | |
189 | - | then "docking_A" | |
190 | - | else if (if ((200 > n)) | |
191 | - | then (blacklistCode != "docking_B") | |
192 | - | else false) | |
193 | - | then "docking_B" | |
194 | - | else if (if ((300 > n)) | |
195 | - | then (blacklistCode != "docking_C") | |
196 | - | else false) | |
197 | - | then "docking_C" | |
198 | - | else if (if ((400 > n)) | |
199 | - | then (blacklistCode != "docking_D") | |
200 | - | else false) | |
201 | - | then "docking_D" | |
202 | - | else if (if ((450 > n)) | |
203 | - | then (blacklistCode != "incubator") | |
204 | - | else false) | |
205 | - | then "incubator" | |
206 | - | else if (if ((490 > n)) | |
207 | - | then (blacklistCode != "duckling_40") | |
208 | - | else false) | |
209 | - | then "duckling_40" | |
210 | - | else if (if ((540 > n)) | |
211 | - | then (blacklistCode != "duckling_20") | |
212 | - | else false) | |
213 | - | then "duckling_20" | |
214 | - | else if (if ((640 > n)) | |
215 | - | then (blacklistCode != "item!ART-FEED5") | |
216 | - | else false) | |
217 | - | then "item!ART-FEED5" | |
218 | - | else if (if ((710 > n)) | |
219 | - | then (blacklistCode != "item!ART-FEED10") | |
220 | - | else false) | |
221 | - | then "item!ART-FEED10" | |
222 | - | else if (if ((740 > n)) | |
223 | - | then (blacklistCode != "item!ART-FEED15") | |
224 | - | else false) | |
225 | - | then "item!ART-FEED15" | |
226 | - | else if (if ((770 > n)) | |
227 | - | then (blacklistCode != "item!ART-FEED20") | |
228 | - | else false) | |
229 | - | then "item!ART-FEED20" | |
230 | - | else if (if ((790 > n)) | |
231 | - | then (blacklistCode != "item!ART-FEED25") | |
232 | - | else false) | |
233 | - | then "item!ART-FEED25" | |
234 | - | else if (if ((810 > n)) | |
235 | - | then (blacklistCode != "item!ART-FEED50") | |
236 | - | else false) | |
237 | - | then "item!ART-FEED50" | |
238 | - | else if (if ((830 > n)) | |
239 | - | then (blacklistCode != "item!ART-FEED100") | |
240 | - | else false) | |
241 | - | then "item!ART-FEED100" | |
242 | - | else if (if ((860 > n)) | |
243 | - | then (blacklistCode != "item!ART-MUTARIUM-G") | |
244 | - | else false) | |
245 | - | then "item!ART-MUTARIUM-G" | |
246 | - | else if (if ((890 > n)) | |
247 | - | then (blacklistCode != "item!ART-MUTARIUM-D") | |
248 | - | else false) | |
249 | - | then "item!ART-MUTARIUM-D" | |
250 | - | else if (if ((910 > n)) | |
251 | - | then (blacklistCode != "item!ART-FREEGENE") | |
252 | - | else false) | |
253 | - | then "item!ART-FREEGENE" | |
254 | - | else if (if ((930 > n)) | |
255 | - | then (blacklistCode != "item!ART-FIXGENE") | |
256 | - | else false) | |
257 | - | then "item!ART-FIXGENE" | |
258 | - | else if (if ((980 > n)) | |
259 | - | then (blacklistCode != "trtl_incubator") | |
260 | - | else false) | |
261 | - | then "trtl_incubator" | |
262 | - | else "item!ART-POTION" | |
263 | - | $Tuple2(n, result) | |
264 | - | } | |
181 | + | let n = getRandomNumber(1000, tx, finishHeight, 0) | |
182 | + | let result = "jackpot" | |
183 | + | $Tuple2(n, result) | |
265 | 184 | } | |
266 | 185 | ||
267 | 186 | ||
268 | 187 | func getRandomReturn (tx,finishHeight) = { | |
269 | 188 | let n = getRandomNumber(2, tx, finishHeight, 1) | |
270 | 189 | if ((n == 0)) | |
271 | 190 | then true | |
272 | 191 | else false | |
273 | 192 | } | |
274 | 193 | ||
275 | 194 | ||
276 | 195 | func finishRebirthInternal (initTx,address,additionalPayment,double,blacklistCode,rescue) = { | |
277 | 196 | let finishBlock = tryGetInteger((((("address_" + address) + "_initTx_") + initTx) + "_finishBlock")) | |
278 | 197 | let status = tryGetString((((("address_" + address) + "_initTx_") + initTx) + "_status")) | |
279 | 198 | let validPayment = checkAdditionalPayment(additionalPayment) | |
280 | 199 | if ((validPayment == validPayment)) | |
281 | 200 | then if ((status != "open")) | |
282 | 201 | then throw("rebirth is finished or not open") | |
283 | 202 | else if ((finishBlock > height)) | |
284 | 203 | then throw("you cannot finish rebirth, yet") | |
285 | 204 | else { | |
286 | 205 | let output = getRandomWin(fromBase58String(initTx), finishBlock, blacklistCode) | |
287 | 206 | let win = output._2 | |
288 | 207 | let random = output._1 | |
289 | 208 | let txId = initTx | |
290 | 209 | let result = if ((indexOf(win, "docking") != unit)) | |
291 | 210 | then { | |
292 | 211 | let color = takeRight(win, 1) | |
293 | 212 | let call = if (!(double)) | |
294 | 213 | then { | |
295 | 214 | let first = invoke(getCanineStakingAddress(), "addFreePerch", [address, color, 1], nil) | |
296 | 215 | if ((first == first)) | |
297 | 216 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first))] | |
298 | 217 | else throw("Strict value is not equal to itself.") | |
299 | 218 | } | |
300 | 219 | else { | |
301 | 220 | let first = invoke(getCanineStakingAddress(), "addFreePerch", [address, color, 2], nil) | |
302 | 221 | if ((first == first)) | |
303 | 222 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result1"), asString(first)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_win1"), win)] | |
304 | 223 | else throw("Strict value is not equal to itself.") | |
305 | 224 | } | |
306 | 225 | if ((call == call)) | |
307 | 226 | then call | |
308 | 227 | else throw("Strict value is not equal to itself.") | |
309 | 228 | } | |
310 | 229 | else if ((win == "jackpot")) | |
311 | 230 | then { | |
312 | 231 | let call = invoke(getCanineIncubatorAddress(), "issueJackpot", [address, txId, "WWWWHWTF"], nil) | |
313 | 232 | if ((call == call)) | |
314 | 233 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(call))] | |
315 | 234 | else throw("Strict value is not equal to itself.") | |
316 | 235 | } | |
317 | 236 | else if ((win == "incubator")) | |
318 | 237 | then { | |
319 | 238 | let call = if (!(double)) | |
320 | 239 | then { | |
321 | 240 | let first = invoke(getCanineIncubatorAddress(), "issueFree", [address, txId], nil) | |
322 | 241 | if ((first == first)) | |
323 | 242 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first))] | |
324 | 243 | else throw("Strict value is not equal to itself.") | |
325 | 244 | } | |
326 | 245 | else { | |
327 | 246 | let first = invoke(getCanineIncubatorAddress(), "issueFree", [address, txId], nil) | |
328 | 247 | if ((first == first)) | |
329 | 248 | then { | |
330 | 249 | let second = invoke(getTurtleIncubatorAddress(), "issueFreeTurtle", [address, txId], nil) | |
331 | 250 | if ((second == second)) | |
332 | 251 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result1"), asString(second)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_win1"), "incubator")] | |
333 | 252 | else throw("Strict value is not equal to itself.") | |
334 | 253 | } | |
335 | 254 | else throw("Strict value is not equal to itself.") | |
336 | 255 | } | |
337 | 256 | if ((call == call)) | |
338 | 257 | then call | |
339 | 258 | else throw("Strict value is not equal to itself.") | |
340 | 259 | } | |
341 | 260 | else if ((indexOf(win, "duckling") != unit)) | |
342 | 261 | then { | |
343 | 262 | let level = parseIntValue(split(win, "_")[1]) | |
344 | 263 | let levelFinal = if (double) | |
345 | 264 | then (2 * level) | |
346 | 265 | else level | |
347 | 266 | let call = invoke(getBabyDuckAddress(), "issueFreeDuckling", [address, txId, levelFinal], nil) | |
348 | 267 | if ((call == call)) | |
349 | 268 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(call))] | |
350 | 269 | else throw("Strict value is not equal to itself.") | |
351 | 270 | } | |
352 | 271 | else if ((win == "trtl_incubator")) | |
353 | 272 | then { | |
354 | 273 | let call = if (!(double)) | |
355 | 274 | then { | |
356 | 275 | let first = invoke(getTurtleIncubatorAddress(), "issueFreeTurtle", [address, txId], nil) | |
357 | 276 | if ((first == first)) | |
358 | 277 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first))] | |
359 | 278 | else throw("Strict value is not equal to itself.") | |
360 | 279 | } | |
361 | 280 | else { | |
362 | 281 | let first = invoke(getTurtleIncubatorAddress(), "issueFreeTurtle", [address, txId], nil) | |
363 | 282 | if ((first == first)) | |
364 | 283 | then { | |
365 | 284 | let second = invoke(getCanineIncubatorAddress(), "issueFree", [address, txId], nil) | |
366 | 285 | if ((second == second)) | |
367 | 286 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result1"), asString(second)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_win1"), "trtl_incubator")] | |
368 | 287 | else throw("Strict value is not equal to itself.") | |
369 | 288 | } | |
370 | 289 | else throw("Strict value is not equal to itself.") | |
371 | 290 | } | |
372 | 291 | if ((call == call)) | |
373 | 292 | then call | |
374 | 293 | else throw("Strict value is not equal to itself.") | |
375 | 294 | } | |
376 | 295 | else if ((indexOf(win, "item") != unit)) | |
377 | 296 | then { | |
378 | 297 | let itemName = split(win, "!")[1] | |
379 | 298 | let call = if (!(double)) | |
380 | 299 | then { | |
381 | 300 | let first = invoke(getItemsAddress(), "issueArtefactIndex", [itemName, address, 0], nil) | |
382 | 301 | if ((first == first)) | |
383 | 302 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first))] | |
384 | 303 | else throw("Strict value is not equal to itself.") | |
385 | 304 | } | |
386 | 305 | else { | |
387 | 306 | let first = invoke(getItemsAddress(), "issueArtefactIndex", [itemName, address, 0], nil) | |
388 | 307 | if ((first == first)) | |
389 | 308 | then { | |
390 | 309 | let second = invoke(getItemsAddress(), "issueArtefactIndex", [itemName, address, 1], nil) | |
391 | 310 | if ((second == second)) | |
392 | 311 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result1"), asString(second)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_win1"), win)] | |
393 | 312 | else throw("Strict value is not equal to itself.") | |
394 | 313 | } | |
395 | 314 | else throw("Strict value is not equal to itself.") | |
396 | 315 | } | |
397 | 316 | if ((call == call)) | |
398 | 317 | then call | |
399 | 318 | else throw("Strict value is not equal to itself.") | |
400 | 319 | } | |
401 | 320 | else throw(("RFB: Some error occured, please contact the admins! " + win)) | |
402 | 321 | if ((result == result)) | |
403 | 322 | then { | |
404 | 323 | let returnToSender = if (rescue) | |
405 | 324 | then getRandomReturn(fromBase58String(initTx), finishBlock) | |
406 | 325 | else false | |
407 | 326 | let returnPayload = if (returnToSender) | |
408 | 327 | then { | |
409 | 328 | let assetId = fromBase58String(getStringValue((((("address_" + address) + "_initTx_") + initTx) + "_assetId"))) | |
410 | 329 | let issuer = checkReal(assetId) | |
411 | 330 | let gen = asString(invoke(getCanineBreederAddress(), "getGenFromName", [value(assetInfo(assetId)).name], nil)) | |
412 | 331 | if ((gen == gen)) | |
413 | 332 | then { | |
414 | 333 | let call = invoke(issuer, "increaseRarity", [toBase58String(assetId), gen], nil) | |
415 | 334 | if ((call == call)) | |
416 | 335 | then [ScriptTransfer(addressFromStringValue(address), 1, assetId)] | |
417 | 336 | else throw("Strict value is not equal to itself.") | |
418 | 337 | } | |
419 | 338 | else throw("Strict value is not equal to itself.") | |
420 | 339 | } | |
421 | 340 | else nil | |
422 | 341 | (((result ++ [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_win"), win), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_status"), "finish"), IntegerEntry((((("address_" + address) + "_initTx_") + initTx) + "_random"), random)]) ++ validPayment) ++ returnPayload) | |
423 | 342 | } | |
424 | 343 | else throw("Strict value is not equal to itself.") | |
425 | 344 | } | |
426 | 345 | else throw("Strict value is not equal to itself.") | |
427 | 346 | } | |
428 | 347 | ||
429 | 348 | ||
430 | 349 | @Callable(i) | |
431 | 350 | func configureOracle (oracle) = if ((i.caller != this)) | |
432 | 351 | then throw("RCU: admin only") | |
433 | 352 | else [StringEntry("static_oracleAddress", oracle)] | |
434 | 353 | ||
435 | 354 | ||
436 | 355 | ||
437 | 356 | @Callable(i) | |
438 | 357 | func initRebirth () = { | |
439 | 358 | let pmtCanine = i.payments[0] | |
440 | 359 | let pmtWaves = i.payments[1] | |
441 | 360 | let assetId = value(pmtCanine.assetId) | |
442 | 361 | let initTx = toBase58String(i.transactionId) | |
443 | 362 | let address = toString(i.caller) | |
444 | 363 | if ((pmtCanine.amount != 1)) | |
445 | 364 | then throw("NFT is not attached") | |
446 | 365 | else if (if ((pmtWaves.amount != wavesAmount)) | |
447 | 366 | then true | |
448 | 367 | else (pmtWaves.assetId != unit)) | |
449 | 368 | then throw("Wavespayment is not attached or wrong!") | |
450 | 369 | else { | |
451 | 370 | let sendToAggreGator = (pmtWaves.amount / 4) | |
452 | 371 | let topup = (pmtWaves.amount - sendToAggreGator) | |
453 | 372 | let addMore = invoke(getCanineStakingAddress(), "addWavesAndStakeMore", nil, [AttachedPayment(unit, topup)]) | |
454 | 373 | if ((addMore == addMore)) | |
455 | 374 | then { | |
456 | 375 | let issuer = checkReal(assetId) | |
457 | 376 | let gen = asString(invoke(getCanineBreederAddress(), "getGenFromName", [value(assetInfo(assetId)).name], nil)) | |
458 | 377 | if ((gen == gen)) | |
459 | 378 | then { | |
460 | 379 | let call = invoke(issuer, "reduceRarity", [toBase58String(assetId), gen], nil) | |
461 | 380 | if ((call == call)) | |
462 | 381 | then [IntegerEntry((((("address_" + address) + "_initTx_") + initTx) + "_finishBlock"), (height + delayForHatching)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_status"), "open"), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_assetId"), toBase58String(assetId)), ScriptTransfer(getFeeAggregator(), sendToAggreGator, unit)] | |
463 | 382 | else throw("Strict value is not equal to itself.") | |
464 | 383 | } | |
465 | 384 | else throw("Strict value is not equal to itself.") | |
466 | 385 | } | |
467 | 386 | else throw("Strict value is not equal to itself.") | |
468 | 387 | } | |
469 | 388 | } | |
470 | 389 | ||
471 | 390 | ||
472 | 391 | ||
473 | 392 | @Callable(i) | |
474 | 393 | func finishRebirth (initTx) = finishRebirthInternal(initTx, toString(i.caller), i.payments[0], false, "", false) | |
475 | 394 | ||
476 | 395 | ||
477 | 396 | ||
478 | 397 | @Callable(i) | |
479 | 398 | func finishRebirthDouble (initTx) = if (!(if ((size(i.payments) == 2)) | |
480 | 399 | then (i.payments[0].amount == 1) | |
481 | 400 | else false)) | |
482 | 401 | then throw("Invalid payment") | |
483 | 402 | else { | |
484 | 403 | let assetId = value(i.payments[0].assetId) | |
485 | 404 | let boosterType = asString(invoke(getItemsAddress(), "checkArtefactDetails", [toBase58String(assetId)], nil)) | |
486 | 405 | if ((boosterType == boosterType)) | |
487 | 406 | then if ((boosterType == "ART-GIFT_DOUBL")) | |
488 | 407 | then ([Burn(assetId, 1)] ++ finishRebirthInternal(initTx, toString(i.caller), i.payments[1], true, "", false)) | |
489 | 408 | else throw("Error! Wrong item attached to double rewards!") | |
490 | 409 | else throw("Strict value is not equal to itself.") | |
491 | 410 | } | |
492 | 411 | ||
493 | 412 | ||
494 | 413 | ||
495 | 414 | @Callable(i) | |
496 | 415 | func finishRebirthItem (initTx,itemCode) = if (if ((size(i.payments) == 2)) | |
497 | 416 | then (i.payments[0].amount == 1) | |
498 | 417 | else false) | |
499 | 418 | then { | |
500 | 419 | let assetId = value(i.payments[0].assetId) | |
501 | 420 | let boosterType = asString(invoke(getItemsAddress(), "checkArtefactDetails", [toBase58String(assetId)], nil)) | |
502 | 421 | if ((boosterType == boosterType)) | |
503 | 422 | then if ((boosterType == "ART-HWERASE")) | |
504 | 423 | then ([Burn(assetId, 1)] ++ finishRebirthInternal(initTx, toString(i.caller), i.payments[1], false, itemCode, false)) | |
505 | 424 | else if ((boosterType == "ART-HWRESCUE")) | |
506 | 425 | then ([Burn(assetId, 1)] ++ finishRebirthInternal(initTx, toString(i.caller), i.payments[1], false, "", true)) | |
507 | 426 | else if ((boosterType == "ART-GIFT_DOUBL")) | |
508 | 427 | then ([Burn(assetId, 1)] ++ finishRebirthInternal(initTx, toString(i.caller), i.payments[1], true, "", false)) | |
509 | 428 | else throw("Error! Wrong item attached ") | |
510 | 429 | else throw("Strict value is not equal to itself.") | |
511 | 430 | } | |
512 | 431 | else if ((size(i.payments) == 1)) | |
513 | 432 | then finishRebirthInternal(initTx, toString(i.caller), i.payments[0], false, "", false) | |
514 | 433 | else throw("Invalid payments") | |
515 | 434 | ||
516 | 435 | ||
517 | 436 | @Verifier(tx) | |
518 | 437 | func verify () = if (isTestEnv()) | |
519 | 438 | then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
520 | 439 | else { | |
521 | 440 | let firstUser = base58'6TdaXEfhnjYquvPf3yV7MFxt2CbgFmaqsvGwkKfXtKi4' | |
522 | 441 | let secondUser = base58'7DsP2WaMLocbHuUxux7pbXRjTrrZ1TFQPsi5QumS3gr8' | |
523 | 442 | let thirdUser = base58'BpFWP3p3JgYrrP45xfrKzeMcWMEXoinj4FVPPkUiA8D3' | |
524 | 443 | let firstUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], firstUser)) | |
525 | 444 | then 1 | |
526 | 445 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], firstUser)) | |
527 | 446 | then 1 | |
528 | 447 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], firstUser)) | |
529 | 448 | then 1 | |
530 | 449 | else 0 | |
531 | 450 | let secondUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], secondUser)) | |
532 | 451 | then 1 | |
533 | 452 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], secondUser)) | |
534 | 453 | then 1 | |
535 | 454 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], secondUser)) | |
536 | 455 | then 1 | |
537 | 456 | else 0 | |
538 | 457 | let thirdUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], thirdUser)) | |
539 | 458 | then 1 | |
540 | 459 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], thirdUser)) | |
541 | 460 | then 1 | |
542 | 461 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], thirdUser)) | |
543 | 462 | then 1 | |
544 | 463 | else 0 | |
545 | 464 | let signaturesCount = ((firstUserSigned + secondUserSigned) + thirdUserSigned) | |
546 | 465 | match tx { | |
547 | 466 | case _ => | |
548 | - | (signaturesCount >= | |
467 | + | (signaturesCount >= 1) | |
549 | 468 | } | |
550 | 469 | } | |
551 | 470 |
github/deemru/w8io/026f985 48.89 ms ◑