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