tx · FdwuGHCoYnXwiGMvnvDUz9ePGA24hsURG8Hm8L2q5uf6 3N5UweaCwk6K5PZ2g8nfVuK4zDnpayfoHLD: -0.01300000 Waves 2024.10.07 20:23 [3316718] smart account 3N5UweaCwk6K5PZ2g8nfVuK4zDnpayfoHLD > SELF 0.00000000 Waves
{ "type": 13, "id": "FdwuGHCoYnXwiGMvnvDUz9ePGA24hsURG8Hm8L2q5uf6", "fee": 1300000, "feeAssetId": null, "timestamp": 1728321815751, "version": 2, "chainId": 84, "sender": "3N5UweaCwk6K5PZ2g8nfVuK4zDnpayfoHLD", "senderPublicKey": "4BC9YSFztjgMg9nqBHTu2DiSzyLSUbmnBYgW5DSRwctE", "proofs": [ "LD7zCu6dF4MwsZLcEPHUkUBFvwGh47vv2UF54uRePqfCkPdxVC8M7ztQSdtGt82KvRPuTsk2aAE8ooCNRCdYiBG" ], "script": "base64:BgIWCAISAwoBCBIGCgQICAEIEgMKAQgSACIBF3N0YXRpY0tleV9vcmFjbGVBZGRyZXNzAAIUc3RhdGljX29yYWNsZUFkZHJlc3MBEnN0YXRpY0tleV9leHRyYUZlZQACD3N0YXRpY19leHRyYUZlZQEWc3RhdGljS2V5X3NwaWNlQXNzZXRJZAACE3N0YXRpY19zcGljZUFzc2V0SWQBGHN0YXRpY0tleV9icmVlZGVyQWRkcmVzcwACFXN0YXRpY19icmVlZGVyQWRkcmVzcwEXc3RhdGljS2V5X2ZlZUFnZ3JlZ2F0b3IAAhRzdGF0aWNfZmVlQWdncmVnYXRvcgEec3RhdGljS2V5X3R1cnRsZVN0YWtpbmdBZGRyZXNzAAIbc3RhdGljX3R1cnRsZVN0YWtpbmdBZGRyZXNzARR0cnlHZXRTdHJpbmdFeHRlcm5hbAIHYWRkcmVzcwNrZXkEByRtYXRjaDAJAJ0IAgUHYWRkcmVzcwUDa2V5AwkAAQIFByRtYXRjaDACBlN0cmluZwQBYQUHJG1hdGNoMAUBYQIAAQ5rZXlCbGFja2xpc3RlZAEKZHVja2xpb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AAEEHNlY29uZFVzZXJTaWduZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQpzZWNvbmRVc2VyAAEDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwABBQpzZWNvbmRVc2VyAAEDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwACBQpzZWNvbmRVc2VyAAEAAAQPdGhpcmRVc2VyU2lnbmVkAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUJdGhpcmRVc2VyAAEDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwABBQl0aGlyZFVzZXIAAQMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAIFCXRoaXJkVXNlcgABAAAED3NpZ25hdHVyZXNDb3VudAkAZAIJAGQCBQ9maXJzdFVzZXJTaWduZWQFEHNlY29uZFVzZXJTaWduZWQFD3RoaXJkVXNlclNpZ25lZAQHJG1hdGNoMAUCdHgJAGcCBQ9zaWduYXR1cmVzQ291bnQAAgj3pOQ=", "height": 3316718, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | func staticKey_oracleAddress () = "static_oracleAddress" | |
5 | + | ||
6 | + | ||
7 | + | func staticKey_extraFee () = "static_extraFee" | |
8 | + | ||
9 | + | ||
10 | + | func staticKey_spiceAssetId () = "static_spiceAssetId" | |
11 | + | ||
12 | + | ||
13 | + | func staticKey_breederAddress () = "static_breederAddress" | |
14 | + | ||
15 | + | ||
16 | + | func staticKey_feeAggregator () = "static_feeAggregator" | |
17 | + | ||
18 | + | ||
19 | + | func staticKey_turtleStakingAddress () = "static_turtleStakingAddress" | |
20 | + | ||
21 | + | ||
22 | + | func tryGetStringExternal (address,key) = match getString(address, key) { | |
23 | + | case a: String => | |
24 | + | a | |
25 | + | case _ => | |
26 | + | "" | |
27 | + | } | |
28 | + | ||
29 | + | ||
30 | + | func keyBlacklisted (ducklingId) = (("duckling_" + ducklingId) + "_blacklisted") | |
31 | + | ||
32 | + | ||
33 | + | func tryGetIntegerExternal (address,key) = match getInteger(address, key) { | |
34 | + | case b: Int => | |
35 | + | b | |
36 | + | case _ => | |
37 | + | 0 | |
38 | + | } | |
39 | + | ||
40 | + | ||
41 | + | func tryGetString (key) = tryGetStringExternal(this, key) | |
42 | + | ||
43 | + | ||
44 | + | func getOracle () = Address(fromBase58String(tryGetString(staticKey_oracleAddress()))) | |
45 | + | ||
46 | + | ||
47 | + | func getSpiceAssetId () = fromBase58String(tryGetStringExternal(getOracle(), staticKey_spiceAssetId())) | |
48 | + | ||
49 | + | ||
50 | + | func getBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_breederAddress()))) | |
51 | + | ||
52 | + | ||
53 | + | func getFeeAggregator () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_feeAggregator()))) | |
54 | + | ||
55 | + | ||
56 | + | func getTurtleStakingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_turtleStakingAddress()))) | |
57 | + | ||
58 | + | ||
59 | + | func checkAdditionalPayment (payment) = if (isDefined(payment.assetId)) | |
60 | + | then throw("BDCAP: Please attach waves") | |
61 | + | else { | |
62 | + | let feeAmount = getIntegerValue(getOracle(), staticKey_extraFee()) | |
63 | + | if ((payment.amount != feeAmount)) | |
64 | + | then throw((("BDCAP: Please attach exactly " + toString(feeAmount)) + " amount of wavelets")) | |
65 | + | else [ScriptTransfer(getFeeAggregator(), feeAmount, unit)] | |
66 | + | } | |
67 | + | ||
68 | + | ||
69 | + | let KGlobalIssuedTimestamp = "global_issued_timestamp" | |
70 | + | ||
71 | + | func keyTotalFeed (ducklingId) = (("duckling_" + ducklingId) + "_feed") | |
72 | + | ||
73 | + | ||
74 | + | func keyGen (ducklingId) = (("duckling_" + ducklingId) + "_gen") | |
75 | + | ||
76 | + | ||
77 | + | func keyFeedNeeded (ducklingId) = (("duckling_" + ducklingId) + "_feedNeeded") | |
78 | + | ||
79 | + | ||
80 | + | func getDucklingPrice (ducklingId) = { | |
81 | + | let key = keyFeedNeeded(ducklingId) | |
82 | + | match getInteger(this, key) { | |
83 | + | case b: Int => | |
84 | + | (b * 100000000) | |
85 | + | case _ => | |
86 | + | 8000000000 | |
87 | + | } | |
88 | + | } | |
89 | + | ||
90 | + | ||
91 | + | func keyDucklingFedLastTimestamp (ducklingId) = (("duckling_" + ducklingId) + "_fedLastTs") | |
92 | + | ||
93 | + | ||
94 | + | func keyDucklingLevel (ducklingId) = (("duckling_" + ducklingId) + "_level") | |
95 | + | ||
96 | + | ||
97 | + | func keyDucklingGrown (ducklingId) = (("duckling_" + ducklingId) + "_grown") | |
98 | + | ||
99 | + | ||
100 | + | func keyStartPercentage (ducklingId) = (("duckling_" + ducklingId) + "_startPercentage") | |
101 | + | ||
102 | + | ||
103 | + | func keyOwner (ducklingId) = (("duckling_" + ducklingId) + "_owner") | |
104 | + | ||
105 | + | ||
106 | + | func tryGetInteger (key) = { | |
107 | + | let val = match getInteger(this, key) { | |
108 | + | case b: Int => | |
109 | + | b | |
110 | + | case _ => | |
111 | + | 0 | |
112 | + | } | |
113 | + | val | |
114 | + | } | |
115 | + | ||
116 | + | ||
117 | + | func getBool (key) = match getBoolean(this, key) { | |
118 | + | case b: Boolean => | |
119 | + | b | |
120 | + | case _ => | |
121 | + | false | |
122 | + | } | |
123 | + | ||
124 | + | ||
125 | + | func getCurrentLevelInt (ducklingId) = { | |
126 | + | let kDuckLevel = keyDucklingLevel(ducklingId) | |
127 | + | match getString(kDuckLevel) { | |
128 | + | case s: String => | |
129 | + | parseIntValue(s) | |
130 | + | case u: Unit => | |
131 | + | 0 | |
132 | + | case _ => | |
133 | + | throw("BGCLBI: Weird value detected!") | |
134 | + | } | |
135 | + | } | |
136 | + | ||
137 | + | ||
138 | + | func getLastFedTimestamp (ducklingId) = { | |
139 | + | let lastFedTimestamp = tryGetInteger(keyDucklingFedLastTimestamp(ducklingId)) | |
140 | + | if ((lastFedTimestamp > 0)) | |
141 | + | then lastFedTimestamp | |
142 | + | else lastBlock.timestamp | |
143 | + | } | |
144 | + | ||
145 | + | ||
146 | + | func calculateNewDucklingLevel (ducklingId,paymentAmount) = { | |
147 | + | let currentTs = lastBlock.timestamp | |
148 | + | let lastFedTimestampChecked = getLastFedTimestamp(ducklingId) | |
149 | + | let fedDiff = (currentTs - lastFedTimestampChecked) | |
150 | + | let growth = paymentAmount | |
151 | + | let currentLevel = getCurrentLevelInt(ducklingId) | |
152 | + | let newLevel = (currentLevel + paymentAmount) | |
153 | + | if ((newLevel > getDucklingPrice(ducklingId))) | |
154 | + | then throw((("BCNDL: You are feeding your duckling to much! Only " + toString((getDucklingPrice(ducklingId) - currentLevel))) + "needed!")) | |
155 | + | else { | |
156 | + | let result = toString(newLevel) | |
157 | + | $Tuple2(result, [("currentLevel=" + toString(currentLevel)), ("newLevel=" + toString(newLevel)), ("growth=" + toString(growth)), ("lastFedTs=" + toString(lastFedTimestampChecked)), ("fedDiff=" + toString(fedDiff))]) | |
158 | + | } | |
159 | + | } | |
160 | + | ||
161 | + | ||
162 | + | func asInt (value) = match value { | |
163 | + | case int: Int => | |
164 | + | int | |
165 | + | case _ => | |
166 | + | throw("BAI: wrong type, expected: Int") | |
167 | + | } | |
168 | + | ||
169 | + | ||
170 | + | func tryGetBoolean (key) = match getBoolean(key) { | |
171 | + | case b: Boolean => | |
172 | + | b | |
173 | + | case _ => | |
174 | + | false | |
175 | + | } | |
176 | + | ||
177 | + | ||
178 | + | func isTestEnv () = getBool("TESTENV") | |
179 | + | ||
180 | + | ||
181 | + | @Callable(i) | |
182 | + | func configureOracle (oracle) = if ((i.caller != this)) | |
183 | + | then throw("BCO: admin only") | |
184 | + | else [StringEntry("static_oracleAddress", oracle)] | |
185 | + | ||
186 | + | ||
187 | + | ||
188 | + | @Callable(i) | |
189 | + | func issueDuckling (address,txIdStr,spiceAmount,gen) = if ((i.caller != getBreederAddress())) | |
190 | + | then throw("BID: You can't issue free duckling") | |
191 | + | else { | |
192 | + | let asset = Issue("BABY-11111111-HZ", "", 1, 0, false, unit, height) | |
193 | + | let assetId = calculateAssetId(asset) | |
194 | + | $Tuple2([StringEntry((((address + "_") + txIdStr) + "_di"), toBase58String(assetId)), IntegerEntry("stats_amount", (tryGetInteger("stats_amount") + 1)), BooleanEntry((("duckling_" + toBase58String(assetId)) + "_issuedByFeedCall"), (i.caller == this)), IntegerEntry(keyStartPercentage(toBase58String(assetId)), 0), StringEntry(keyOwner(toBase58String(assetId)), address), StringEntry(keyGen(toBase58String(assetId)), gen), IntegerEntry(keyFeedNeeded(toBase58String(assetId)), spiceAmount), asset, ScriptTransfer(value(addressFromString(address)), 1, assetId)], toBase58String(assetId)) | |
195 | + | } | |
196 | + | ||
197 | + | ||
198 | + | ||
199 | + | @Callable(i) | |
200 | + | func feedDuckling (ducklingId) = { | |
201 | + | let addressString = toString(i.caller) | |
202 | + | let realDucklingId = if (if ((size(i.payments) != 2)) | |
203 | + | then true | |
204 | + | else (value(i.payments[0]).assetId != getSpiceAssetId())) | |
205 | + | then throw("BFD: Bad payment attached (asset[s] or amount)") | |
206 | + | else { | |
207 | + | let blackListed = tryGetBoolean(keyBlacklisted(ducklingId)) | |
208 | + | if (blackListed) | |
209 | + | then throw("BFD: Can not feed blacklisted duckling!") | |
210 | + | else if (getBool(keyDucklingGrown(ducklingId))) | |
211 | + | then throw("BFD: Duckling is already grown") | |
212 | + | else if ((ducklingId == "")) | |
213 | + | then throw("BFD: Please hatch a duckling first!") | |
214 | + | else { | |
215 | + | let ducklingOwner = tryGetString(keyOwner(ducklingId)) | |
216 | + | let ducklingIdCheck = value(assetInfo(fromBase58String(ducklingId))) | |
217 | + | if ((assetBalance(i.caller, ducklingIdCheck.id) != 1)) | |
218 | + | then throw("BFD: You're not the owner of the duckling") | |
219 | + | else if ((ducklingOwner != toString(i.caller))) | |
220 | + | then throw("BFD: You can only feed ducklings that you won/bought yourself!") | |
221 | + | else if ((ducklingIdCheck.issuer != this)) | |
222 | + | then throw("BFD: Cant find duckling with such id") | |
223 | + | else { | |
224 | + | let ducklingIdString = toBase58String(ducklingIdCheck.id) | |
225 | + | ducklingIdString | |
226 | + | } | |
227 | + | } | |
228 | + | } | |
229 | + | let kDucklingLastFedTs = keyDucklingFedLastTimestamp(ducklingId) | |
230 | + | let currentPayment = value(i.payments[0]).amount | |
231 | + | let kNewLevel = keyDucklingLevel(realDucklingId) | |
232 | + | let kTotalFeed = keyTotalFeed(realDucklingId) | |
233 | + | let totalFeed = tryGetInteger(kTotalFeed) | |
234 | + | let kFeedTxStats = ((("duckling_" + realDucklingId) + "_stat_") + toString(lastBlock.timestamp)) | |
235 | + | let validPayments = checkAdditionalPayment(i.payments[1]) | |
236 | + | if ((validPayments == validPayments)) | |
237 | + | then { | |
238 | + | let calculateResults = calculateNewDucklingLevel(realDucklingId, currentPayment) | |
239 | + | let topup = invoke(getTurtleStakingAddress(), "topUpReward", nil, [AttachedPayment(getSpiceAssetId(), (currentPayment / 2))]) | |
240 | + | if ((topup == topup)) | |
241 | + | then ([IntegerEntry(kDucklingLastFedTs, lastBlock.timestamp), IntegerEntry(kTotalFeed, (totalFeed + currentPayment)), IntegerEntry(kFeedTxStats, currentPayment), StringEntry(kNewLevel, calculateResults._1), StringEntry((kFeedTxStats + "_debug"), makeString(calculateResults._2, ";")), Burn(getSpiceAssetId(), (currentPayment / 2))] ++ validPayments) | |
242 | + | else throw("Strict value is not equal to itself.") | |
243 | + | } | |
244 | + | else throw("Strict value is not equal to itself.") | |
245 | + | } | |
246 | + | ||
247 | + | ||
248 | + | ||
249 | + | @Callable(i) | |
250 | + | func turnDucklingIntoDuck () = { | |
251 | + | let validPayments = checkAdditionalPayment(i.payments[1]) | |
252 | + | if ((validPayments == validPayments)) | |
253 | + | then if ((i.caller != getBreederAddress())) | |
254 | + | then throw("BTDIT: You can't turn duckling") | |
255 | + | else { | |
256 | + | let address = toString(i.caller) | |
257 | + | let txId = toBase58String(i.transactionId) | |
258 | + | let lastIssuedDucklingTs = tryGetInteger(KGlobalIssuedTimestamp) | |
259 | + | let fiveMinInMs = ((1 * 60) * 1000) | |
260 | + | let timeDiff = (lastBlock.timestamp - (lastIssuedDucklingTs + fiveMinInMs)) | |
261 | + | if (if ((lastIssuedDucklingTs > 0)) | |
262 | + | then (0 > timeDiff) | |
263 | + | else false) | |
264 | + | then throw((("BTDIT: Can issue ducklings only once per 1 minutes, please wait for " + toString(fraction(timeDiff, 1, 1000))) + " sec.")) | |
265 | + | else if ((size(i.payments) != 2)) | |
266 | + | then throw("BTDIT: Bad payment attached (asset[s] or amount)") | |
267 | + | else if ((i.payments[0].amount != 1)) | |
268 | + | then throw("BTDIT: Please attach a nft!") | |
269 | + | else { | |
270 | + | let pmt = value(assetInfo(value(value(i.payments[0]).assetId))) | |
271 | + | let price = getDucklingPrice(toBase58String(pmt.id)) | |
272 | + | if ((price > getCurrentLevelInt(toBase58String(pmt.id)))) | |
273 | + | then throw(((("BTDIT: Duckling is not grown yet..." + toString(getCurrentLevelInt(toBase58String(pmt.id)))) + " ") + toString(price))) | |
274 | + | else if ((pmt.issuer != this)) | |
275 | + | then throw("BTDIT: Can use only ducklings from this dApp") | |
276 | + | else { | |
277 | + | let kDucklingGrown = keyDucklingGrown(toBase58String(pmt.id)) | |
278 | + | $Tuple2(([BooleanEntry(kDucklingGrown, true), IntegerEntry(KGlobalIssuedTimestamp, lastBlock.timestamp)] ++ validPayments), toBase58String(pmt.id)) | |
279 | + | } | |
280 | + | } | |
281 | + | } | |
282 | + | else throw("Strict value is not equal to itself.") | |
283 | + | } | |
284 | + | ||
285 | + | ||
286 | + | @Verifier(tx) | |
287 | + | func verify () = if (isTestEnv()) | |
288 | + | then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
289 | + | else { | |
290 | + | let firstUser = base58'6TdaXEfhnjYquvPf3yV7MFxt2CbgFmaqsvGwkKfXtKi4' | |
291 | + | let secondUser = base58'7DsP2WaMLocbHuUxux7pbXRjTrrZ1TFQPsi5QumS3gr8' | |
292 | + | let thirdUser = base58'BpFWP3p3JgYrrP45xfrKzeMcWMEXoinj4FVPPkUiA8D3' | |
293 | + | let firstUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], firstUser)) | |
294 | + | then 1 | |
295 | + | else if (sigVerify(tx.bodyBytes, tx.proofs[1], firstUser)) | |
296 | + | then 1 | |
297 | + | else if (sigVerify(tx.bodyBytes, tx.proofs[2], firstUser)) | |
298 | + | then 1 | |
299 | + | else 0 | |
300 | + | let secondUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], secondUser)) | |
301 | + | then 1 | |
302 | + | else if (sigVerify(tx.bodyBytes, tx.proofs[1], secondUser)) | |
303 | + | then 1 | |
304 | + | else if (sigVerify(tx.bodyBytes, tx.proofs[2], secondUser)) | |
305 | + | then 1 | |
306 | + | else 0 | |
307 | + | let thirdUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], thirdUser)) | |
308 | + | then 1 | |
309 | + | else if (sigVerify(tx.bodyBytes, tx.proofs[1], thirdUser)) | |
310 | + | then 1 | |
311 | + | else if (sigVerify(tx.bodyBytes, tx.proofs[2], thirdUser)) | |
312 | + | then 1 | |
313 | + | else 0 | |
314 | + | let signaturesCount = ((firstUserSigned + secondUserSigned) + thirdUserSigned) | |
315 | + | match tx { | |
316 | + | case _ => | |
317 | + | (signaturesCount >= 2) | |
318 | + | } | |
319 | + | } | |
320 | + |
github/deemru/w8io/169f3d6 25.10 ms ◑