tx · GBPvQk9YhHR9Kn8nSVikF64fW2k5ERxNNjUzRH6bdAYz

3Myz9GtrZ8K6kbSPSDzd5G4wBjuEDVHLFQc:  -0.11300000 Waves

2022.07.27 18:55 [2158425] smart account 3Myz9GtrZ8K6kbSPSDzd5G4wBjuEDVHLFQc > SELF 0.00000000 Waves

{ "type": 13, "id": "GBPvQk9YhHR9Kn8nSVikF64fW2k5ERxNNjUzRH6bdAYz", "fee": 11300000, "feeAssetId": null, "timestamp": 1658937294055, "version": 2, "chainId": 84, "sender": "3Myz9GtrZ8K6kbSPSDzd5G4wBjuEDVHLFQc", "senderPublicKey": "CA71qLoghoRv3dLmoVCAcrCy6etvA68ioPm5f61MKkh", "proofs": [ "jH4XpVzUrRzwCfWxkv7T5MsAuMQh2N91bbhLaPR4Ue9BUap9iw9KtSsMMZv3brFmACx89kh85uj3RQsMz6j8uow" ], "script": "base64:AAIFAAAAAAAAACMIAhIDCgEBEgMKAQgSAwoBCBIDCgEIEgASAwoBCBIECgIICAAAABUAAAAAC2VnZ3NBc3NldElkAQAAACCjn39PI3JR0SziIZJiiE0MC/PqIm6B1a/8C5MXzm2xyQAAAAAQZGVsYXlGb3JIYXRjaGluZwAAAAAAAAAAAgAAAAALdHlwZXNBbW91bnQAAAAAAAAAAAkAAAAAEnJlZkNvbnRyYWN0QWRkcmVzcwEAAAAaAVdJun1CvJ+wEYXBypiq1jTt8AvN7+jD7qUAAAAADVJlZmVyZXJSZXdhcmQAAAAAAAAAAAUAAAAAD0hhdGNoaW5nU3RhcnRlZAIAAAAQSEFUQ0hJTkdfU1RBUlRFRAAAAAAQSGF0Y2hpbmdGaW5pc2hlZAIAAAARSEFUQ0hJTkdfRklOSVNIRUQAAAAADnJlYmlydGhBZGRyZXNzAQAAABoBV3CRddSe63o+H/lkADDI3EZdXJpE33XC9wAAAAAQYmFieUR1Y2tzQWRkcmVzcwEAAAAaAVfDo8tHAeegleDgE8m9dZsB82cmhk/rApEAAAAAEHN3b3BQcm9tb0FkZ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b2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5KlfuwQ==", "height": 2158425, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2XukPStAjTju5r8Lc9ht7DHc9Z2krkLjP2eQWu8tqkfh Next: none Diff:
OldNewDifferences
5959
6060 func getRandomNumber (variants,txId,hatchingFinishHeight,offset) = {
6161 let randomSeedBlock = value(blockInfoByHeight((hatchingFinishHeight - 1)))
62- let randomHash = sha256((txId + value(randomSeedBlock.vrf)))
62+ let randomHash = sha256(txId)
6363 (toInt(randomHash, (offset * 8)) % variants)
6464 }
6565
170170 else if ((hatchingFinishHeight > height))
171171 then throw((((("Hatching is not finished yet " + toString((hatchingFinishHeight - height))) + " blocks remaining, it will take around ") + toString((hatchingFinishHeight - height))) + " minutes"))
172172 else {
173- let $t065136579 = getRandomName(txId, hatchingFinishHeight)
174- let duckGen = $t065136579._1
175- let farmGen = $t065136579._2
173+ let $t064846550 = getRandomName(txId, hatchingFinishHeight)
174+ let duckGen = $t064846550._1
175+ let farmGen = $t064846550._2
176176 let description = (("{\"genotype\": \"" + duckGen) + "\", \"crossbreeding\": true}")
177177 let asset = Issue(duckGen, description, 1, 0, false, unit, hatchingFinishHeight)
178178 let assetId = calculateAssetId(asset)
192192 let finishHeightKey = getHatchingFinishHeightKey(address, txId)
193193 let totalDucksAmount = tryGetInteger("ducks_amount")
194194 let eggsNeeded = countEggsNeededAmount(totalDucksAmount)
195- let $t077987849 = getRandomName(txId, (5 + 1))
196- let duckGen = $t077987849._1
197- let farmGen = $t077987849._2
195+ let $t077697820 = getRandomName(txId, (5 + 1))
196+ let duckGen = $t077697820._1
197+ let farmGen = $t077697820._2
198198 let description = (("{\"genotype\": \"" + duckGen) + "\", \"crossbreeding\": true}")
199199 let asset = Issue(duckGen, description, 1, 0, false, unit, height)
200200 let assetId = calculateAssetId(asset)
213213 let finishHeightKey = getHatchingFinishHeightKey(address, txId)
214214 let totalDucksAmount = tryGetInteger("ducks_amount")
215215 let eggsNeeded = countEggsNeededAmount(totalDucksAmount)
216- let $t093329384 = $Tuple2((("DUCK-" + gen) + "-JU"), "8W-J")
217- let duckGen = $t093329384._1
218- let farmGen = $t093329384._2
216+ let $t093039355 = $Tuple2((("DUCK-" + gen) + "-JU"), "8W-J")
217+ let duckGen = $t093039355._1
218+ let farmGen = $t093039355._2
219219 let description = (("{\"genotype\": \"" + duckGen) + "\", \"crossbreeding\": true}")
220220 let asset = Issue(duckGen, description, 1, 0, false, unit, height)
221221 let assetId = calculateAssetId(asset)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let eggsAssetId = base58'C1iWsKGqLwjHUndiQ7iXpdmPum9PeCDFfyXBdJJosDRS'
55
66 let delayForHatching = 2
77
88 let typesAmount = 9
99
1010 let refContractAddress = base58'3P8ejTkfRpz9WqCwCuihesNXU5k3zmFFfVe'
1111
1212 let RefererReward = 5
1313
1414 let HatchingStarted = "HATCHING_STARTED"
1515
1616 let HatchingFinished = "HATCHING_FINISHED"
1717
1818 let rebirthAddress = base58'3PCC6fVHNa6289DTDmcUo3RuLaFmteZZsmQ'
1919
2020 let babyDucksAddress = base58'3PKmLiGEfqLWMC1H9xhzqvAZKUXfFm8uoeg'
2121
2222 let swopPromoAddress = base58'3P6s9C39Ak5FAQ3F5VapYJ3ULxgbsAReXWD'
2323
2424 func isLocked () = {
2525 let masterAddress = Address(base58'3PEPftf2kWZDmAaWBjs6BUJa9957kiA2PkU')
2626 match getInteger(masterAddress, "egglock") {
2727 case b: Int =>
2828 b
2929 case _ =>
3030 0
3131 }
3232 }
3333
3434
3535 func getHatchingStatusKey (address,txId) = (((address + "_") + toBase58String(txId)) + "_status")
3636
3737
3838 func getHatchingFinishHeightKey (address,txId) = (((address + "_") + toBase58String(txId)) + "_fh")
3939
4040
4141 func getDuckIdKey (address,txId) = (((address + "_") + toBase58String(txId)) + "_di")
4242
4343
4444 func getDuckStatsKey (genString) = (("stats_" + genString) + "_amount")
4545
4646
4747 func tryGetInteger (key) = {
4848 let val = match getInteger(this, key) {
4949 case b: Int =>
5050 b
5151 case _ =>
5252 0
5353 }
5454 val
5555 }
5656
5757
5858 let discountCoefficient = tryGetInteger("discountCoefficient")
5959
6060 func getRandomNumber (variants,txId,hatchingFinishHeight,offset) = {
6161 let randomSeedBlock = value(blockInfoByHeight((hatchingFinishHeight - 1)))
62- let randomHash = sha256((txId + value(randomSeedBlock.vrf)))
62+ let randomHash = sha256(txId)
6363 (toInt(randomHash, (offset * 8)) % variants)
6464 }
6565
6666
6767 func wasUniqueBorn (gen) = tryGetInteger(getDuckStatsKey(gen))
6868
6969
7070 func getRandomName (txId,hatchingFinishHeight) = {
7171 let jackpotRandom = getRandomNumber(500, txId, hatchingFinishHeight, 0)
7272 if (if ((5 > jackpotRandom))
7373 then (wasUniqueBorn("DUCK-WWWCUPID-JU") == 0)
7474 else false)
7575 then $Tuple2("DUCK-WWWCUPID-JU", "1C1D1I1P1U3W-J")
7676 else {
7777 let typeRandom = getRandomNumber(4, txId, hatchingFinishHeight, 0)
7878 let colorRandom = getRandomNumber(4, txId, hatchingFinishHeight, 1)
7979 let color = if ((colorRandom == 0))
8080 then "Y"
8181 else if ((colorRandom == 1))
8282 then "G"
8383 else if ((colorRandom == 2))
8484 then "B"
8585 else "R"
8686 if ((typeRandom == 0))
8787 then $Tuple2(("DUCK-FFFFFFFF-G" + color), "8F-G")
8888 else if ((typeRandom == 1))
8989 then $Tuple2(("DUCK-HHHHHHHH-G" + color), "8H-G")
9090 else if ((typeRandom == 2))
9191 then $Tuple2(("DUCK-GGGGGGGG-G" + color), "8G-G")
9292 else $Tuple2(("DUCK-IIIIIIII-G" + color), "8I-G")
9393 }
9494 }
9595
9696
9797 func countEggsNeededAmount (totalDucksAmount) = {
9898 let n = totalDucksAmount
9999 let g = discountCoefficient
100100 let t = typesAmount
101101 let price = pow((100 + ((n * g) / (10 * t))), 2, 5, 1, 2, DOWN)
102102 (price * 1000000)
103103 }
104104
105105
106106 @Callable(i)
107107 func setDiscount (val) = if ((i.caller != this))
108108 then throw("admin_only")
109109 else [IntegerEntry("discountCoefficient", val)]
110110
111111
112112
113113 @Callable(i)
114114 func startDuckHatching (refererAddress) = if ((isLocked() > 0))
115115 then throw("EGG operations are temporarily locked")
116116 else {
117117 let totalDucksAmount = tryGetInteger("ducks_amount")
118118 let eggsNeeded = countEggsNeededAmount(totalDucksAmount)
119119 let firstPayment = value(i.payments[0])
120120 let results = [StringEntry(getHatchingStatusKey(toString(i.originCaller), i.transactionId), HatchingStarted), IntegerEntry(getHatchingFinishHeightKey(toString(i.originCaller), i.transactionId), (height + delayForHatching)), IntegerEntry("ducks_amount", (totalDucksAmount + 1)), IntegerEntry("ducks_last_price", (eggsNeeded / 1000000))]
121121 if ((i.caller == Address(babyDucksAddress)))
122122 then (results ++ [BooleanEntry((("hatching_" + toBase58String(i.transactionId)) + "_babyDuck"), true)])
123123 else if ((firstPayment.assetId != eggsAssetId))
124124 then throw(("You can attach only EGG tokens with the following asset id: " + toBase58String(eggsAssetId)))
125125 else if ((eggsNeeded > firstPayment.amount))
126126 then throw(("To hatch a duck you currently need the following amount of EGGlets: " + toString(eggsNeeded)))
127127 else {
128128 let refererReward = fraction(eggsNeeded, RefererReward, 100)
129129 let refCall = invoke(Address(refContractAddress), "refPayment", [refererAddress], [AttachedPayment(eggsAssetId, refererReward)])
130130 if ((refCall == refCall))
131131 then (results ++ [ScriptTransfer(i.caller, (firstPayment.amount - eggsNeeded), eggsAssetId)])
132132 else throw("Strict value is not equal to itself.")
133133 }
134134 }
135135
136136
137137
138138 @Callable(i)
139139 func startDuckHatchingForAddress (address) = if ((isLocked() > 0))
140140 then throw("EGG operations are temporarily locked")
141141 else if ((i.caller != Address(swopPromoAddress)))
142142 then throw("Pernission denied")
143143 else {
144144 let totalDucksAmount = tryGetInteger("ducks_amount")
145145 let eggsNeeded = countEggsNeededAmount(totalDucksAmount)
146146 [StringEntry(getHatchingStatusKey(address, i.transactionId), HatchingStarted), IntegerEntry(getHatchingFinishHeightKey(address, i.transactionId), (height + delayForHatching)), IntegerEntry("ducks_amount", (totalDucksAmount + 1)), IntegerEntry("ducks_last_price", (eggsNeeded / 1000000)), BooleanEntry((("hatching_" + toBase58String(i.transactionId)) + "_promo"), true)]
147147 }
148148
149149
150150
151151 @Callable(i)
152152 func finishDuckHatching (txIdStr) = {
153153 let txId = fromBase58String(txIdStr)
154154 let hatchingStatusKey = getHatchingStatusKey(toString(i.caller), txId)
155155 let finishHeightKey = getHatchingFinishHeightKey(toString(i.caller), txId)
156156 let duckIdKey = getDuckIdKey(toString(i.caller), txId)
157157 let duckFromBaby = match getBoolean((("hatching_" + txIdStr) + "_babyDuck")) {
158158 case t: Boolean =>
159159 t
160160 case _ =>
161161 false
162162 }
163163 let hatchingTxStatus = getStringValue(this, hatchingStatusKey)
164164 let hatchingFinishHeight = getIntegerValue(this, finishHeightKey)
165165 if ((hatchingTxStatus == HatchingFinished))
166166 then {
167167 let duckId = getStringValue(this, getDuckIdKey(toString(i.caller), txId))
168168 throw(("The duck was hatched and claimed already, here is the folowing: " + duckId))
169169 }
170170 else if ((hatchingFinishHeight > height))
171171 then throw((((("Hatching is not finished yet " + toString((hatchingFinishHeight - height))) + " blocks remaining, it will take around ") + toString((hatchingFinishHeight - height))) + " minutes"))
172172 else {
173- let $t065136579 = getRandomName(txId, hatchingFinishHeight)
174- let duckGen = $t065136579._1
175- let farmGen = $t065136579._2
173+ let $t064846550 = getRandomName(txId, hatchingFinishHeight)
174+ let duckGen = $t064846550._1
175+ let farmGen = $t064846550._2
176176 let description = (("{\"genotype\": \"" + duckGen) + "\", \"crossbreeding\": true}")
177177 let asset = Issue(duckGen, description, 1, 0, false, unit, hatchingFinishHeight)
178178 let assetId = calculateAssetId(asset)
179179 let amount = (tryGetInteger(getDuckStatsKey(duckGen)) + 1)
180180 [StringEntry(hatchingStatusKey, HatchingFinished), StringEntry(duckIdKey, toBase58String(assetId)), StringEntry(toBase58String(assetId), duckIdKey), BooleanEntry((("duck_" + toBase58String(assetId)) + "_grown"), duckFromBaby), IntegerEntry(getDuckStatsKey(duckGen), amount), IntegerEntry((("stats_" + farmGen) + "_quantity"), (tryGetInteger((("stats_" + farmGen) + "_quantity")) + 1)), asset, ScriptTransfer(i.caller, 1, assetId)]
181181 }
182182 }
183183
184184
185185
186186 @Callable(i)
187187 func issueFreeDuck () = {
188188 let address = toBase58String(i.caller.bytes)
189189 let txIdStr = toBase58String(i.transactionId)
190190 let txId = fromBase58String(txIdStr)
191191 let hatchingStatusKey = getHatchingStatusKey(address, txId)
192192 let finishHeightKey = getHatchingFinishHeightKey(address, txId)
193193 let totalDucksAmount = tryGetInteger("ducks_amount")
194194 let eggsNeeded = countEggsNeededAmount(totalDucksAmount)
195- let $t077987849 = getRandomName(txId, (5 + 1))
196- let duckGen = $t077987849._1
197- let farmGen = $t077987849._2
195+ let $t077697820 = getRandomName(txId, (5 + 1))
196+ let duckGen = $t077697820._1
197+ let farmGen = $t077697820._2
198198 let description = (("{\"genotype\": \"" + duckGen) + "\", \"crossbreeding\": true}")
199199 let asset = Issue(duckGen, description, 1, 0, false, unit, height)
200200 let assetId = calculateAssetId(asset)
201201 let amount = (tryGetInteger(getDuckStatsKey(duckGen)) + 1)
202202 let duckIdKey = getDuckIdKey(address, txId)
203203 $Tuple2([IntegerEntry(getHatchingFinishHeightKey(address, txId), height), IntegerEntry("ducks_amount", (totalDucksAmount + 1)), IntegerEntry("ducks_last_price", (eggsNeeded / 1000000)), StringEntry(toBase58String(assetId), toBase58String(assetId)), StringEntry(toBase58String(i.transactionId), toBase58String(assetId)), StringEntry(hatchingStatusKey, HatchingFinished), StringEntry(duckIdKey, toBase58String(assetId)), StringEntry(toBase58String(assetId), duckIdKey), IntegerEntry(getDuckStatsKey(duckGen), amount), IntegerEntry((("stats_" + farmGen) + "_quantity"), (tryGetInteger((("stats_" + farmGen) + "_quantity")) + 1)), asset, ScriptTransfer(value(addressFromString(address)), 1, assetId)], toBase58String(assetId))
204204 }
205205
206206
207207
208208 @Callable(i)
209209 func issueJackpot (gen) = {
210210 let txId = i.transactionId
211211 let address = toBase58String(i.caller.bytes)
212212 let hatchingStatusKey = getHatchingStatusKey(address, txId)
213213 let finishHeightKey = getHatchingFinishHeightKey(address, txId)
214214 let totalDucksAmount = tryGetInteger("ducks_amount")
215215 let eggsNeeded = countEggsNeededAmount(totalDucksAmount)
216- let $t093329384 = $Tuple2((("DUCK-" + gen) + "-JU"), "8W-J")
217- let duckGen = $t093329384._1
218- let farmGen = $t093329384._2
216+ let $t093039355 = $Tuple2((("DUCK-" + gen) + "-JU"), "8W-J")
217+ let duckGen = $t093039355._1
218+ let farmGen = $t093039355._2
219219 let description = (("{\"genotype\": \"" + duckGen) + "\", \"crossbreeding\": true}")
220220 let asset = Issue(duckGen, description, 1, 0, false, unit, height)
221221 let assetId = calculateAssetId(asset)
222222 let duckIdKey = getDuckIdKey(address, txId)
223223 $Tuple2([IntegerEntry(getHatchingFinishHeightKey(address, txId), height), IntegerEntry("ducks_amount", (totalDucksAmount + 1)), IntegerEntry("ducks_last_price", (eggsNeeded / 1000000)), StringEntry(hatchingStatusKey, HatchingFinished), StringEntry(duckIdKey, toBase58String(assetId)), StringEntry(toBase58String(assetId), duckIdKey), IntegerEntry(getDuckStatsKey(duckGen), (tryGetInteger(getDuckStatsKey(duckGen)) + 1)), IntegerEntry((("stats_" + farmGen) + "_quantity"), (tryGetInteger((("stats_" + farmGen) + "_quantity")) + 1)), asset, ScriptTransfer(value(addressFromString(address)), 1, assetId)], toBase58String(assetId))
224224 }
225225
226226
227227
228228 @Callable(i)
229229 func reduceRarity (assetId,fGen) = {
230230 let asset = fromBase58String(assetId)
231231 if (if ((i.caller != Address(rebirthAddress)))
232232 then (i.caller != this)
233233 else false)
234234 then throw("admin or rebirth only")
235235 else {
236236 let duckGen = value(assetInfo(asset)).name
237237 let letter = takeRight(take(duckGen, 6), 1)
238238 let farmGen = (("8" + letter) + "-G")
239239 [IntegerEntry(getDuckStatsKey(duckGen), (tryGetInteger(getDuckStatsKey(duckGen)) - 1)), IntegerEntry((("stats_" + farmGen) + "_quantity"), (tryGetInteger((("stats_" + farmGen) + "_quantity")) - 1))]
240240 }
241241 }
242242
243243
244244 @Verifier(tx)
245245 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
246246

github/deemru/w8io/169f3d6 
50.52 ms