tx · 2XukPStAjTju5r8Lc9ht7DHc9Z2krkLjP2eQWu8tqkfh

3Myz9GtrZ8K6kbSPSDzd5G4wBjuEDVHLFQc:  -0.01300000 Waves

2022.07.27 18:44 [2158413] smart account 3Myz9GtrZ8K6kbSPSDzd5G4wBjuEDVHLFQc > SELF 0.00000000 Waves

{ "type": 13, "id": "2XukPStAjTju5r8Lc9ht7DHc9Z2krkLjP2eQWu8tqkfh", "fee": 1300000, "feeAssetId": null, "timestamp": 1658936712159, "version": 2, "chainId": 84, "sender": "3Myz9GtrZ8K6kbSPSDzd5G4wBjuEDVHLFQc", "senderPublicKey": "CA71qLoghoRv3dLmoVCAcrCy6etvA68ioPm5f61MKkh", "proofs": [ "36KUZGW7JV65AVeLtnDj79gp5s8JaF44c92dxL4NqBmGDTP9bLNxsLmAEntrFqmBYntRJobDhXFSUXLnTPuPs5ZD" ], "script": "base64:AAIFAAAAAAAAACMIAhIDCgEBEgMKAQgSAwoBCBIDCgEIEgASAwoBCBIECgIICAAAABUAAAAAC2VnZ3NBc3NldElkAQAAACCjn39PI3JR0SziIZJiiE0MC/PqIm6B1a/8C5MXzm2xyQAAAAAQZGVsYXlGb3JIYXRjaGluZwAAAAAAAAAAAgAAAAALdHlwZXNBbW91bnQAAAAAAAAAAAkAAAAAEnJlZkNvbnRyYWN0QWRkcmVzcwEAAAAaAVdJun1CvJ+wEYXBypiq1jTt8AvN7+jD7qUAAAAADVJlZmVyZXJSZXdhcmQAAAAAAAAAAAUAAAAAD0hhdGNoaW5nU3RhcnRlZAIAAAAQSEFUQ0hJTkdfU1RBUlRFRAAAAAAQSGF0Y2hpbmdGaW5pc2hlZAIAAAARSEFUQ0hJTkdfRklOSVNIRUQAAAAADnJlYmlydGhBZGRyZXNzAQAAABoBV3CRddSe63o+H/lkADDI3EZdXJpE33XC9wAAAAAQYmFieUR1Y2tzQWRkcmVzcwEAAAAaAVfDo8tHAeegleDgE8m9dZsB82cmhk/rApEAAAAAEHN3b3BQcm9tb0FkZH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AH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V58rSJew==", "height": 2158413, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: GBPvQk9YhHR9Kn8nSVikF64fW2k5ERxNNjUzRH6bdAYz Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let eggsAssetId = base58'C1iWsKGqLwjHUndiQ7iXpdmPum9PeCDFfyXBdJJosDRS'
5+
6+let delayForHatching = 2
7+
8+let typesAmount = 9
9+
10+let refContractAddress = base58'3P8ejTkfRpz9WqCwCuihesNXU5k3zmFFfVe'
11+
12+let RefererReward = 5
13+
14+let HatchingStarted = "HATCHING_STARTED"
15+
16+let HatchingFinished = "HATCHING_FINISHED"
17+
18+let rebirthAddress = base58'3PCC6fVHNa6289DTDmcUo3RuLaFmteZZsmQ'
19+
20+let babyDucksAddress = base58'3PKmLiGEfqLWMC1H9xhzqvAZKUXfFm8uoeg'
21+
22+let swopPromoAddress = base58'3P6s9C39Ak5FAQ3F5VapYJ3ULxgbsAReXWD'
23+
24+func isLocked () = {
25+ let masterAddress = Address(base58'3PEPftf2kWZDmAaWBjs6BUJa9957kiA2PkU')
26+ match getInteger(masterAddress, "egglock") {
27+ case b: Int =>
28+ b
29+ case _ =>
30+ 0
31+ }
32+ }
33+
34+
35+func getHatchingStatusKey (address,txId) = (((address + "_") + toBase58String(txId)) + "_status")
36+
37+
38+func getHatchingFinishHeightKey (address,txId) = (((address + "_") + toBase58String(txId)) + "_fh")
39+
40+
41+func getDuckIdKey (address,txId) = (((address + "_") + toBase58String(txId)) + "_di")
42+
43+
44+func getDuckStatsKey (genString) = (("stats_" + genString) + "_amount")
45+
46+
47+func tryGetInteger (key) = {
48+ let val = match getInteger(this, key) {
49+ case b: Int =>
50+ b
51+ case _ =>
52+ 0
53+ }
54+ val
55+ }
56+
57+
58+let discountCoefficient = tryGetInteger("discountCoefficient")
59+
60+func getRandomNumber (variants,txId,hatchingFinishHeight,offset) = {
61+ let randomSeedBlock = value(blockInfoByHeight((hatchingFinishHeight - 1)))
62+ let randomHash = sha256((txId + value(randomSeedBlock.vrf)))
63+ (toInt(randomHash, (offset * 8)) % variants)
64+ }
65+
66+
67+func wasUniqueBorn (gen) = tryGetInteger(getDuckStatsKey(gen))
68+
69+
70+func getRandomName (txId,hatchingFinishHeight) = {
71+ let jackpotRandom = getRandomNumber(500, txId, hatchingFinishHeight, 0)
72+ if (if ((5 > jackpotRandom))
73+ then (wasUniqueBorn("DUCK-WWWCUPID-JU") == 0)
74+ else false)
75+ then $Tuple2("DUCK-WWWCUPID-JU", "1C1D1I1P1U3W-J")
76+ else {
77+ let typeRandom = getRandomNumber(4, txId, hatchingFinishHeight, 0)
78+ let colorRandom = getRandomNumber(4, txId, hatchingFinishHeight, 1)
79+ let color = if ((colorRandom == 0))
80+ then "Y"
81+ else if ((colorRandom == 1))
82+ then "G"
83+ else if ((colorRandom == 2))
84+ then "B"
85+ else "R"
86+ if ((typeRandom == 0))
87+ then $Tuple2(("DUCK-FFFFFFFF-G" + color), "8F-G")
88+ else if ((typeRandom == 1))
89+ then $Tuple2(("DUCK-HHHHHHHH-G" + color), "8H-G")
90+ else if ((typeRandom == 2))
91+ then $Tuple2(("DUCK-GGGGGGGG-G" + color), "8G-G")
92+ else $Tuple2(("DUCK-IIIIIIII-G" + color), "8I-G")
93+ }
94+ }
95+
96+
97+func countEggsNeededAmount (totalDucksAmount) = {
98+ let n = totalDucksAmount
99+ let g = discountCoefficient
100+ let t = typesAmount
101+ let price = pow((100 + ((n * g) / (10 * t))), 2, 5, 1, 2, DOWN)
102+ (price * 1000000)
103+ }
104+
105+
106+@Callable(i)
107+func setDiscount (val) = if ((i.caller != this))
108+ then throw("admin_only")
109+ else [IntegerEntry("discountCoefficient", val)]
110+
111+
112+
113+@Callable(i)
114+func startDuckHatching (refererAddress) = if ((isLocked() > 0))
115+ then throw("EGG operations are temporarily locked")
116+ else {
117+ let totalDucksAmount = tryGetInteger("ducks_amount")
118+ let eggsNeeded = countEggsNeededAmount(totalDucksAmount)
119+ let firstPayment = value(i.payments[0])
120+ 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))]
121+ if ((i.caller == Address(babyDucksAddress)))
122+ then (results ++ [BooleanEntry((("hatching_" + toBase58String(i.transactionId)) + "_babyDuck"), true)])
123+ else if ((firstPayment.assetId != eggsAssetId))
124+ then throw(("You can attach only EGG tokens with the following asset id: " + toBase58String(eggsAssetId)))
125+ else if ((eggsNeeded > firstPayment.amount))
126+ then throw(("To hatch a duck you currently need the following amount of EGGlets: " + toString(eggsNeeded)))
127+ else {
128+ let refererReward = fraction(eggsNeeded, RefererReward, 100)
129+ let refCall = invoke(Address(refContractAddress), "refPayment", [refererAddress], [AttachedPayment(eggsAssetId, refererReward)])
130+ if ((refCall == refCall))
131+ then (results ++ [ScriptTransfer(i.caller, (firstPayment.amount - eggsNeeded), eggsAssetId)])
132+ else throw("Strict value is not equal to itself.")
133+ }
134+ }
135+
136+
137+
138+@Callable(i)
139+func startDuckHatchingForAddress (address) = if ((isLocked() > 0))
140+ then throw("EGG operations are temporarily locked")
141+ else if ((i.caller != Address(swopPromoAddress)))
142+ then throw("Pernission denied")
143+ else {
144+ let totalDucksAmount = tryGetInteger("ducks_amount")
145+ let eggsNeeded = countEggsNeededAmount(totalDucksAmount)
146+[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)]
147+ }
148+
149+
150+
151+@Callable(i)
152+func finishDuckHatching (txIdStr) = {
153+ let txId = fromBase58String(txIdStr)
154+ let hatchingStatusKey = getHatchingStatusKey(toString(i.caller), txId)
155+ let finishHeightKey = getHatchingFinishHeightKey(toString(i.caller), txId)
156+ let duckIdKey = getDuckIdKey(toString(i.caller), txId)
157+ let duckFromBaby = match getBoolean((("hatching_" + txIdStr) + "_babyDuck")) {
158+ case t: Boolean =>
159+ t
160+ case _ =>
161+ false
162+ }
163+ let hatchingTxStatus = getStringValue(this, hatchingStatusKey)
164+ let hatchingFinishHeight = getIntegerValue(this, finishHeightKey)
165+ if ((hatchingTxStatus == HatchingFinished))
166+ then {
167+ let duckId = getStringValue(this, getDuckIdKey(toString(i.caller), txId))
168+ throw(("The duck was hatched and claimed already, here is the folowing: " + duckId))
169+ }
170+ else if ((hatchingFinishHeight > height))
171+ then throw((((("Hatching is not finished yet " + toString((hatchingFinishHeight - height))) + " blocks remaining, it will take around ") + toString((hatchingFinishHeight - height))) + " minutes"))
172+ else {
173+ let $t065136579 = getRandomName(txId, hatchingFinishHeight)
174+ let duckGen = $t065136579._1
175+ let farmGen = $t065136579._2
176+ let description = (("{\"genotype\": \"" + duckGen) + "\", \"crossbreeding\": true}")
177+ let asset = Issue(duckGen, description, 1, 0, false, unit, hatchingFinishHeight)
178+ let assetId = calculateAssetId(asset)
179+ let amount = (tryGetInteger(getDuckStatsKey(duckGen)) + 1)
180+[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)]
181+ }
182+ }
183+
184+
185+
186+@Callable(i)
187+func issueFreeDuck () = {
188+ let address = toBase58String(i.caller.bytes)
189+ let txIdStr = toBase58String(i.transactionId)
190+ let txId = fromBase58String(txIdStr)
191+ let hatchingStatusKey = getHatchingStatusKey(address, txId)
192+ let finishHeightKey = getHatchingFinishHeightKey(address, txId)
193+ let totalDucksAmount = tryGetInteger("ducks_amount")
194+ let eggsNeeded = countEggsNeededAmount(totalDucksAmount)
195+ let $t077987849 = getRandomName(txId, (5 + 1))
196+ let duckGen = $t077987849._1
197+ let farmGen = $t077987849._2
198+ let description = (("{\"genotype\": \"" + duckGen) + "\", \"crossbreeding\": true}")
199+ let asset = Issue(duckGen, description, 1, 0, false, unit, height)
200+ let assetId = calculateAssetId(asset)
201+ let amount = (tryGetInteger(getDuckStatsKey(duckGen)) + 1)
202+ let duckIdKey = getDuckIdKey(address, txId)
203+ $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))
204+ }
205+
206+
207+
208+@Callable(i)
209+func issueJackpot (gen) = {
210+ let txId = i.transactionId
211+ let address = toBase58String(i.caller.bytes)
212+ let hatchingStatusKey = getHatchingStatusKey(address, txId)
213+ let finishHeightKey = getHatchingFinishHeightKey(address, txId)
214+ let totalDucksAmount = tryGetInteger("ducks_amount")
215+ let eggsNeeded = countEggsNeededAmount(totalDucksAmount)
216+ let $t093329384 = $Tuple2((("DUCK-" + gen) + "-JU"), "8W-J")
217+ let duckGen = $t093329384._1
218+ let farmGen = $t093329384._2
219+ let description = (("{\"genotype\": \"" + duckGen) + "\", \"crossbreeding\": true}")
220+ let asset = Issue(duckGen, description, 1, 0, false, unit, height)
221+ let assetId = calculateAssetId(asset)
222+ let duckIdKey = getDuckIdKey(address, txId)
223+ $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))
224+ }
225+
226+
227+
228+@Callable(i)
229+func reduceRarity (assetId,fGen) = {
230+ let asset = fromBase58String(assetId)
231+ if (if ((i.caller != Address(rebirthAddress)))
232+ then (i.caller != this)
233+ else false)
234+ then throw("admin or rebirth only")
235+ else {
236+ let duckGen = value(assetInfo(asset)).name
237+ let letter = takeRight(take(duckGen, 6), 1)
238+ let farmGen = (("8" + letter) + "-G")
239+[IntegerEntry(getDuckStatsKey(duckGen), (tryGetInteger(getDuckStatsKey(duckGen)) - 1)), IntegerEntry((("stats_" + farmGen) + "_quantity"), (tryGetInteger((("stats_" + farmGen) + "_quantity")) - 1))]
240+ }
241+ }
242+
243+
244+@Verifier(tx)
245+func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
246+

github/deemru/w8io/026f985 
24.86 ms