tx · 8REZcGqEXuMye2U6CK3nWktL36WjS1AhLK2WzqWU1z1T 3MtBigTsaeevrcJAEwVcr4quwkqcrtnjoAh: -0.05000000 Waves 2021.08.19 14:25 [1665168] smart account 3MtBigTsaeevrcJAEwVcr4quwkqcrtnjoAh > SELF 0.00000000 Waves
{ "type": 13, "id": "8REZcGqEXuMye2U6CK3nWktL36WjS1AhLK2WzqWU1z1T", "fee": 5000000, "feeAssetId": null, "timestamp": 1629372369574, "version": 2, "chainId": 84, "sender": "3MtBigTsaeevrcJAEwVcr4quwkqcrtnjoAh", "senderPublicKey": "6r8zYctv2wqVaDctJMYvewjk2Hs2k3MSmcW63GbU1jx9", "proofs": [ "2crEq9XGNohw7UVhHQePsXAT6oG4Ha71QobXd83qzV1nabiVX5MegWerB1BTqhfkjtK316dt29sgaBRXY8y9F9RA" ], "script": "base64:AAIFAAAAAAAAABwIAhIAEgMKAQgSBAoCCAgSBQoDCAgIEgQKAggIAAAAEgAAAAALZWdnc0Fzc2V0SWQBAAAAICUCZcz3BGjIvgFZkXjlWFo4ZhQTrUpMSrf+BRdIFxaDAAAAABBkZWxheUZvckhhdGNoaW5nAAAAAAAAAAAAAAAAABNkaXNjb3VudENvZWZmaWNpZW50AAAAAAAAAAAKAAAAAAt0eXBlc0Ftb3VudAAAAAAAAAAABgAAAAAScmVmQ29udHJhY3RBZGRyZXNzAQAAABoBV0m6fUK8n7ARhcHKmKrWNO3wC83v6MPupQAAAAANUmVmZXJlclJld2FyZAAAAAAAAAAABQAAAAAPSGF0Y2hpbmdTdGFydGVkAgAAABBIQVRDSElOR19TVEFSVEVEAAAAABBIYXRjaGluZ0ZpbmlzaGVkAgAAABFIQVRDSElOR19GSU5JU0hFRAAAAAAOcmViaXJ0aEFkZHJlc3MBAAAAGgFXcJF11J7rej4f+WQAMMjcRl1cmkTfdcL3AQAAABRnZXRIYXRjaGluZ1N0YXR1c0tleQAAAAIAAAAHYWRkcmVzcwAAAAR0eElkCQABLAAAAAIJAAEsAAA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bWluIG9yIHJlYmlydGggb25seQQAAAAHZHVja0dlbggJAQAAAAV2YWx1ZQAAAAEJAAPsAAAAAQUAAAAFYXNzZXQAAAAEbmFtZQQAAAAGbGV0dGVyCQEAAAAJdGFrZVJpZ2h0AAAAAgkAAS8AAAACBQAAAAdkdWNrR2VuAAAAAAAAAAAGAAAAAAAAAAABBAAAAAdmYXJtR2VuCQABLAAAAAIJAAEsAAAAAgIAAAABOAUAAAAGbGV0dGVyAgAAAAItRwkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkBAAAAD2dldER1Y2tTdGF0c0tleQAAAAEFAAAAB2R1Y2tHZW4JAABlAAAAAgkBAAAADXRyeUdldEludGVnZXIAAAABCQEAAAAPZ2V0RHVja1N0YXRzS2V5AAAAAQUAAAAHZHVja0dlbgAAAAAAAAAAAQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQABLAAAAAICAAAABnN0YXRzXwUAAAAHZmFybUdlbgIAAAAJX3F1YW50aXR5CQAAZQAAAAIJAQAAAA10cnlHZXRJbnRlZ2VyAAAAAQkAASwAAAACCQABLAAAAAICAAAABnN0YXRzXwUAAAAHZmFybUdlbgIAAAAJX3F1YW50aXR5AAAAAAAAAAABBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleWkfGP8=", "height": 1665168, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8ncxjSy8oG1UxcYVLY7v8WyjhXo6j7hosB1Ycwq1mgiu Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let eggsAssetId = base58'3VUCuh9dWqe54SdzzNUkXhFXpc8UQynnJVh42B7MjNzN' | |
5 | 5 | ||
6 | 6 | let delayForHatching = 0 | |
7 | 7 | ||
8 | 8 | let discountCoefficient = 10 | |
9 | 9 | ||
10 | 10 | let typesAmount = 6 | |
11 | 11 | ||
12 | 12 | let refContractAddress = base58'3P8ejTkfRpz9WqCwCuihesNXU5k3zmFFfVe' | |
13 | 13 | ||
14 | 14 | let RefererReward = 5 | |
15 | 15 | ||
16 | 16 | let HatchingStarted = "HATCHING_STARTED" | |
17 | 17 | ||
18 | 18 | let HatchingFinished = "HATCHING_FINISHED" | |
19 | 19 | ||
20 | 20 | let rebirthAddress = base58'3PCC6fVHNa6289DTDmcUo3RuLaFmteZZsmQ' | |
21 | 21 | ||
22 | 22 | func getHatchingStatusKey (address,txId) = (((address + "_") + toBase58String(txId)) + "_status") | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func getHatchingFinishHeightKey (address,txId) = (((address + "_") + toBase58String(txId)) + "_fh") | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func getDuckIdKey (address,txId) = (((address + "_") + toBase58String(txId)) + "_di") | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | func getDuckStatsKey (genString) = (("stats_" + genString) + "_amount") | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func tryGetInteger (key) = { | |
35 | 35 | let val = match getInteger(this, key) { | |
36 | 36 | case b: Int => | |
37 | 37 | b | |
38 | 38 | case _ => | |
39 | 39 | 0 | |
40 | 40 | } | |
41 | 41 | val | |
42 | 42 | } | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func getRandomNumber (variants,txId,hatchingFinishHeight,offset) = { | |
46 | 46 | let randomSeedBlock = value(blockInfoByHeight((hatchingFinishHeight - 1))) | |
47 | 47 | let randomHash = sha256((txId + value(randomSeedBlock.vrf))) | |
48 | 48 | (toInt(randomHash, (offset * 8)) % variants) | |
49 | 49 | } | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func wasUniqueBorn (gen) = tryGetInteger(getDuckStatsKey(gen)) | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func getRandomName (txId,hatchingFinishHeight) = { | |
56 | 56 | let jackpotRandom = getRandomNumber(500, txId, hatchingFinishHeight, 0) | |
57 | 57 | if (if ((jackpotRandom == 1)) | |
58 | 58 | then (wasUniqueBorn("DUCK-WWWWWWWW-JU") == 0) | |
59 | 59 | else false) | |
60 | 60 | then $Tuple2("DUCK-WWWWWWWW-JU", "8W-J") | |
61 | 61 | else { | |
62 | 62 | let typeRandom = getRandomNumber(4, txId, hatchingFinishHeight, 0) | |
63 | 63 | let colorRandom = getRandomNumber(4, txId, hatchingFinishHeight, 1) | |
64 | 64 | let color = if ((colorRandom == 0)) | |
65 | 65 | then "Y" | |
66 | 66 | else if ((colorRandom == 1)) | |
67 | 67 | then "G" | |
68 | 68 | else if ((colorRandom == 2)) | |
69 | 69 | then "B" | |
70 | 70 | else "R" | |
71 | 71 | $Tuple2(("DUCK-AAAAAAAA-G" + color), "8A-G") | |
72 | 72 | } | |
73 | 73 | } | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func countEggsNeededAmount (totalDucksAmount) = { | |
77 | 77 | let n = totalDucksAmount | |
78 | 78 | let g = discountCoefficient | |
79 | 79 | let t = typesAmount | |
80 | 80 | let price = pow((100 + ((n * g) / (10 * t))), 2, 5, 1, 2, DOWN) | |
81 | 81 | price | |
82 | 82 | } | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | @Callable(i) | |
86 | 86 | func startDuckHatching () = { | |
87 | 87 | let totalDucksAmount = tryGetInteger("ducks_amount") | |
88 | 88 | let eggsNeeded = countEggsNeededAmount(totalDucksAmount) | |
89 | 89 | let firstPayment = value(i.payments[0]) | |
90 | 90 | if ((firstPayment.assetId != eggsAssetId)) | |
91 | 91 | then throw(("You can attach only EGG tokens with the following asset id: " + toBase58String(eggsAssetId))) | |
92 | 92 | else if ((eggsNeeded > firstPayment.amount)) | |
93 | 93 | then throw(("To hatch a duck you currently need the following amount of EGGlets: " + toString(eggsNeeded))) | |
94 | 94 | else { | |
95 | 95 | let refererReward = ((firstPayment.amount / 100) * RefererReward) | |
96 | 96 | [StringEntry(getHatchingStatusKey(toString(i.caller), i.transactionId), HatchingStarted), IntegerEntry(getHatchingFinishHeightKey(toString(i.caller), i.transactionId), (height + delayForHatching)), IntegerEntry("ducks_amount", (totalDucksAmount + 1)), IntegerEntry("ducks_last_price", eggsNeeded), ScriptTransfer(i.caller, (firstPayment.amount - eggsNeeded), eggsAssetId)] | |
97 | 97 | } | |
98 | 98 | } | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | ||
102 | 102 | @Callable(i) | |
103 | 103 | func finishDuckHatching (txIdStr) = { | |
104 | 104 | let txId = fromBase58String(txIdStr) | |
105 | 105 | let hatchingStatusKey = getHatchingStatusKey(toString(i.caller), txId) | |
106 | 106 | let finishHeightKey = getHatchingFinishHeightKey(toString(i.caller), txId) | |
107 | 107 | let duckIdKey = getDuckIdKey(toString(i.caller), txId) | |
108 | 108 | let hatchingTxStatus = getStringValue(this, hatchingStatusKey) | |
109 | 109 | let hatchingFinishHeight = getIntegerValue(this, finishHeightKey) | |
110 | 110 | if ((hatchingTxStatus == HatchingFinished)) | |
111 | 111 | then { | |
112 | 112 | let duckId = getStringValue(this, getDuckIdKey(toString(i.caller), txId)) | |
113 | 113 | throw(("The duck was hatched and claimed already, here is the folowing: " + duckId)) | |
114 | 114 | } | |
115 | 115 | else if ((hatchingFinishHeight > height)) | |
116 | 116 | then throw((((("Hatching is not finished yet " + toString((hatchingFinishHeight - height))) + " blocks remaining, it will take around ") + toString((hatchingFinishHeight - height))) + " minutes")) | |
117 | 117 | else { | |
118 | 118 | let $t045724638 = getRandomName(txId, hatchingFinishHeight) | |
119 | 119 | let duckGen = $t045724638._1 | |
120 | 120 | let farmGen = $t045724638._2 | |
121 | 121 | let description = (("{\"genotype\": \"" + duckGen) + "\", \"crossbreeding\": true}") | |
122 | 122 | let asset = Issue(duckGen, description, 1, 0, false, unit, hatchingFinishHeight) | |
123 | 123 | let assetId = calculateAssetId(asset) | |
124 | 124 | let amount = (tryGetInteger(getDuckStatsKey(duckGen)) + 1) | |
125 | 125 | [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(i.caller, 1, assetId)] | |
126 | 126 | } | |
127 | 127 | } | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | ||
131 | 131 | @Callable(i) | |
132 | 132 | func issueFreeDuck (address,txIdStr) = if ((i.caller != Address(rebirthAddress))) | |
133 | 133 | then throw("rebirth only") | |
134 | 134 | else { | |
135 | 135 | let txId = fromBase58String(txIdStr) | |
136 | 136 | let hatchingStatusKey = getHatchingStatusKey(address, txId) | |
137 | 137 | let finishHeightKey = getHatchingFinishHeightKey(address, txId) | |
138 | 138 | let totalDucksAmount = tryGetInteger("ducks_amount") | |
139 | 139 | let eggsNeeded = countEggsNeededAmount(totalDucksAmount) | |
140 | 140 | let $t057945846 = getRandomName(txId, height) | |
141 | 141 | let duckGen = $t057945846._1 | |
142 | 142 | let farmGen = $t057945846._2 | |
143 | 143 | let description = (("{\"genotype\": \"" + duckGen) + "\", \"crossbreeding\": true}") | |
144 | 144 | let asset = Issue(duckGen, description, 1, 0, false, unit, height) | |
145 | 145 | let assetId = calculateAssetId(asset) | |
146 | 146 | let amount = (tryGetInteger(getDuckStatsKey(duckGen)) + 1) | |
147 | 147 | let duckIdKey = getDuckIdKey(address, txId) | |
148 | 148 | $Tuple2([IntegerEntry(getHatchingFinishHeightKey(address, txId), height), IntegerEntry("ducks_amount", (totalDucksAmount + 1)), IntegerEntry("ducks_last_price", eggsNeeded), 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)) | |
149 | 149 | } | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | ||
153 | 153 | @Callable(i) | |
154 | 154 | func issueJackpot (address,txIdStr,gen) = if (if ((i.caller != Address(rebirthAddress))) | |
155 | 155 | then (i.caller != this) | |
156 | 156 | else false) | |
157 | 157 | then throw("admin or rebirth only") | |
158 | 158 | else { | |
159 | 159 | let txId = fromBase58String(txIdStr) | |
160 | 160 | let hatchingStatusKey = getHatchingStatusKey(address, txId) | |
161 | 161 | let finishHeightKey = getHatchingFinishHeightKey(address, txId) | |
162 | 162 | let totalDucksAmount = tryGetInteger("ducks_amount") | |
163 | 163 | let eggsNeeded = countEggsNeededAmount(totalDucksAmount) | |
164 | 164 | let $t072897341 = $Tuple2((("DUCK-" + gen) + "-JU"), "8W-J") | |
165 | 165 | let duckGen = $t072897341._1 | |
166 | 166 | let farmGen = $t072897341._2 | |
167 | 167 | let description = (("{\"genotype\": \"" + duckGen) + "\", \"crossbreeding\": true}") | |
168 | 168 | let asset = Issue(duckGen, description, 1, 0, false, unit, height) | |
169 | 169 | let assetId = calculateAssetId(asset) | |
170 | 170 | let duckIdKey = getDuckIdKey(address, txId) | |
171 | 171 | $Tuple2([IntegerEntry(getHatchingFinishHeightKey(address, txId), height), IntegerEntry("ducks_amount", (totalDucksAmount + 1)), IntegerEntry("ducks_last_price", eggsNeeded), 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)) | |
172 | 172 | } | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | ||
176 | 176 | @Callable(i) | |
177 | 177 | func reduceRarity (assetId,fGen) = { | |
178 | 178 | let asset = fromBase58String(assetId) | |
179 | 179 | if (if ((i.caller != Address(rebirthAddress))) | |
180 | 180 | then (i.caller != this) | |
181 | 181 | else false) | |
182 | 182 | then throw("admin or rebirth only") | |
183 | 183 | else { | |
184 | 184 | let duckGen = value(assetInfo(asset)).name | |
185 | 185 | let letter = takeRight(take(duckGen, 6), 1) | |
186 | 186 | let farmGen = (("8" + letter) + "-G") | |
187 | 187 | [IntegerEntry(getDuckStatsKey(duckGen), (tryGetInteger(getDuckStatsKey(duckGen)) - 1)), IntegerEntry((("stats_" + farmGen) + "_quantity"), (tryGetInteger((("stats_" + farmGen) + "_quantity")) - 1))] | |
188 | 188 | } | |
189 | 189 | } | |
190 | 190 | ||
191 | 191 | ||
192 | 192 | @Verifier(tx) | |
193 | 193 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
194 | 194 |
github/deemru/w8io/fabc49c 31.93 ms ◑