tx · BCWLXp3PAQ4g573T45cG3q28k7YpxpLHfXW9gowMu6LF 3N51W4fn1aAAdypU26EGUwNZPr3zikN3vwh: -0.01400000 Waves 2021.08.01 08:57 [1638871] smart account 3N51W4fn1aAAdypU26EGUwNZPr3zikN3vwh > SELF 0.00000000 Waves
{ "type": 13, "id": "BCWLXp3PAQ4g573T45cG3q28k7YpxpLHfXW9gowMu6LF", "fee": 1400000, "feeAssetId": null, "timestamp": 1627797508273, "version": 2, "chainId": 84, "sender": "3N51W4fn1aAAdypU26EGUwNZPr3zikN3vwh", "senderPublicKey": "D7edN6TZzQ6PbyWHGFdGMPJkkRNjR1Y32g7MmU7AXR73", "proofs": [ "59qNB3QV8f33NzE84mJ6eFWCBNBzP9hFRdFNy2DG2QTxyg8efBPRHGRVTtA8BG3CtBEnwzxae7kmicAPBNJgd8Gz" ], "script": "base64:AAIFAAAAAAAAABcIAhIAEgMKAQESAwoBARIAEgMKAQESAAAAAAcAAAAACUJMT0NLU1RFUAAAAAAAAAAACgAAAAAJSU5HT1RDT1NUAAAAAAAAAAPoAAAAAAhQTE9UQ09TVAAAAAAAAAGGoAAAAAAFZ0x1bXABAAAAIPcwjku9kNb2F2wTmbBomIqdANw/L1vEuPdJD1w1hByzAAAAAAREQVBQAQAAABoBVKWQPedm0Te8uocEZojnPgCB9mXBVVoIGAAAAAAJRVBPQ0hTVEVQAAAAAAAAAABkAQAAAApyYW5kb21pemVyAAAAAQAAAANpbnYEAAAACGxhc3RQbGF5BAAAAAckbWF0Y2gwCQAEHAAAAAIFAAAABHRoaXMCAAAACGxhc3RNaW5lAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAApCeXRlVmVjdG9yBAAAAAFzBQAAAAckbWF0Y2gwBQAAAAFzAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAARVbml0AQAAAA5Hb2xkTWluZXJzMjAyMQkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcgQAAAAEcmFuZAkAAMsAAAACCQAAywAAAAIJA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AEsAAAAAgIAAAAIeyJraW5nIjoFAAAACG1heE93bmVyAgAAAAksImVwb2NoIjoJAAGkAAAAAQUAAAAFZXBvY2gCAAAAAX0EAAAABWlzc3VlCQAEQgAAAAUFAAAACWlzc3VlTmFtZQUAAAAJaXNzdWVEZXNjAAAAAAAAAAABAAAAAAAAAAAABwQAAAADbmZ0CQAEOAAAAAEFAAAABWlzc3VlCQAETAAAAAIJAARCAAAABQUAAAAJaXNzdWVOYW1lBQAAAAlpc3N1ZURlc2MAAAAAAAAAAAEAAAAAAAAAAAAHCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAEFAAAACG1heE93bmVyAAAAAAAAAAABBQAAAANuZnQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAABWVwb2NoBQAAAAhuZXdFcG9jaAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAALZXBvY2hIZWlnaHQFAAAAD25leHRFcG9jaEhlaWdodAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXl7jlGr", "height": 1638871, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8rxS4isKvEvZCexVipBn3ZK3euVjVfaE5G2zZ4QmtfJZ Next: 6pqtYvAgfBqySs6X3DJ3iRmxzq42qr8QGPFFuSCY4WV8 Diff:
Old | New | Differences | |
---|---|---|---|
219 | 219 | let issueDesc = (((("{\"king\":" + maxOwner) + ",\"epoch\":") + toString(epoch)) + "}") | |
220 | 220 | let issue = Issue(issueName, issueDesc, 1, 0, false) | |
221 | 221 | let nft = calculateAssetId(issue) | |
222 | - | [ScriptTransfer(addressFromStringValue(maxOwner), 1, nft), IntegerEntry("epoch", newEpoch), IntegerEntry("epochHeight", nextEpochHeight)] | |
222 | + | [Issue(issueName, issueDesc, 1, 0, false), ScriptTransfer(addressFromStringValue(maxOwner), 1, nft), IntegerEntry("epoch", newEpoch), IntegerEntry("epochHeight", nextEpochHeight)] | |
223 | 223 | } | |
224 | 224 | } | |
225 | 225 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let BLOCKSTEP = 10 | |
5 | 5 | ||
6 | 6 | let INGOTCOST = 1000 | |
7 | 7 | ||
8 | 8 | let PLOTCOST = 100000 | |
9 | 9 | ||
10 | 10 | let gLump = base58'HdveNhSzDRiEib9RfQ5EAxmpFVica4EqvBFd2S4pdbD4' | |
11 | 11 | ||
12 | 12 | let DAPP = base58'3N51W4fn1aAAdypU26EGUwNZPr3zikN3vwh' | |
13 | 13 | ||
14 | 14 | let EPOCHSTEP = 100 | |
15 | 15 | ||
16 | 16 | func randomizer (inv) = { | |
17 | 17 | let lastPlay = match getBinary(this, "lastMine") { | |
18 | 18 | case s: ByteVector => | |
19 | 19 | s | |
20 | 20 | case _: Unit => | |
21 | 21 | base58'TGCTLFoHxJ8U7rcUofN' | |
22 | 22 | case _ => | |
23 | 23 | throw("Match error") | |
24 | 24 | } | |
25 | 25 | let rand = (((((lastPlay + inv.transactionId) + inv.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height)) | |
26 | 26 | sha256(rand) | |
27 | 27 | } | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | @Callable(i) | |
31 | 31 | func goToMine () = { | |
32 | 32 | let caller = toBase58String(i.caller.bytes) | |
33 | 33 | let wait = match getInteger(this, ("wait_" + caller)) { | |
34 | 34 | case a: Int => | |
35 | 35 | a | |
36 | 36 | case _ => | |
37 | 37 | 0 | |
38 | 38 | } | |
39 | 39 | let newWait = (lastBlock.height + BLOCKSTEP) | |
40 | 40 | let randhash = randomizer(i) | |
41 | 41 | let count = (toInt(randhash) % 1000) | |
42 | 42 | if ((wait > lastBlock.height)) | |
43 | 43 | then throw((("Wait block " + toString(wait)) + " for mining again")) | |
44 | 44 | else [IntegerEntry(("wait_" + caller), newWait), ScriptTransfer(i.caller, count, gLump), BinaryEntry("lastMine", randhash)] | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | ||
49 | 49 | @Callable(i) | |
50 | 50 | func craftIngot (count) = { | |
51 | 51 | let caller = toBase58String(i.caller.bytes) | |
52 | 52 | let craft = match getInteger(this, ("craft_" + caller)) { | |
53 | 53 | case a: Int => | |
54 | 54 | a | |
55 | 55 | case _ => | |
56 | 56 | 0 | |
57 | 57 | } | |
58 | 58 | let ingots = match getInteger(this, "ingots_count") { | |
59 | 59 | case a: Int => | |
60 | 60 | a | |
61 | 61 | case _ => | |
62 | 62 | 0 | |
63 | 63 | } | |
64 | 64 | let newIngots = (ingots + 1) | |
65 | 65 | let newCraft = (lastBlock.height + BLOCKSTEP) | |
66 | 66 | if ((size(i.payments) == 0)) | |
67 | 67 | then throw("Payment wasn't attached") | |
68 | 68 | else if ((craft > lastBlock.height)) | |
69 | 69 | then throw((("Wait block " + toString(craft)) + " for crafting again")) | |
70 | 70 | else if (if (if ((count != 1)) | |
71 | 71 | then (count != 10) | |
72 | 72 | else false) | |
73 | 73 | then (count != 50) | |
74 | 74 | else false) | |
75 | 75 | then throw("Wrong ingot's weight!") | |
76 | 76 | else { | |
77 | 77 | let payment = i.payments[0] | |
78 | 78 | if ((payment.assetId != gLump)) | |
79 | 79 | then throw("Payment only in gLump") | |
80 | 80 | else if ((payment.amount != (INGOTCOST * count))) | |
81 | 81 | then throw((("Payment expected " + toString((INGOTCOST * count))) + " gLump")) | |
82 | 82 | else { | |
83 | 83 | let issueName = ("INGOT" + toString(newIngots)) | |
84 | 84 | let issueDesc = (((((("{\"weight\":" + toString(count)) + ",\"uid\":") + toString(newIngots)) + ",\"made_by\":\"") + caller) + "\"}") | |
85 | 85 | let issue = Issue(issueName, issueDesc, 1, 0, false) | |
86 | 86 | let nft = calculateAssetId(issue) | |
87 | 87 | [Burn(gLump, (INGOTCOST * count)), Issue(issueName, issueDesc, 1, 0, false), ScriptTransfer(i.caller, 1, nft), IntegerEntry("ingots_count", newIngots), StringEntry(("ingot_" + toString(newIngots)), toBase58String(nft)), IntegerEntry(("craft_" + caller), newCraft), IntegerEntry(("weight_" + toBase58String(nft)), count)] | |
88 | 88 | } | |
89 | 89 | } | |
90 | 90 | } | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | ||
94 | 94 | @Callable(i) | |
95 | 95 | func buyPlot (pSize) = { | |
96 | 96 | let caller = toBase58String(i.caller.bytes) | |
97 | 97 | let plotSize = match getInteger(this, ("plot_" + caller)) { | |
98 | 98 | case a: Int => | |
99 | 99 | a | |
100 | 100 | case _ => | |
101 | 101 | 0 | |
102 | 102 | } | |
103 | 103 | if ((plotSize > 0)) | |
104 | 104 | then throw("You already have a plot!") | |
105 | 105 | else if (if ((0 > plotSize)) | |
106 | 106 | then true | |
107 | 107 | else (plotSize > 1000)) | |
108 | 108 | then throw("Correct size value from 1 to 1000") | |
109 | 109 | else { | |
110 | 110 | let payment = i.payments[0] | |
111 | 111 | if (isDefined(payment.assetId)) | |
112 | 112 | then throw("Payment only in WAVES") | |
113 | 113 | else if ((payment.amount != (pSize * PLOTCOST))) | |
114 | 114 | then throw((("Payment expected " + toString((pSize * PLOTCOST))) + " WAVELET")) | |
115 | 115 | else [IntegerEntry(("plot_" + caller), pSize)] | |
116 | 116 | } | |
117 | 117 | } | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | ||
121 | 121 | @Callable(i) | |
122 | 122 | func goToPlot () = { | |
123 | 123 | let caller = toBase58String(i.caller.bytes) | |
124 | 124 | let plotSize = match getInteger(this, ("plot_" + caller)) { | |
125 | 125 | case a: Int => | |
126 | 126 | a | |
127 | 127 | case _ => | |
128 | 128 | 0 | |
129 | 129 | } | |
130 | 130 | let wait = match getInteger(this, ("wait_" + caller)) { | |
131 | 131 | case a: Int => | |
132 | 132 | a | |
133 | 133 | case _ => | |
134 | 134 | 0 | |
135 | 135 | } | |
136 | 136 | let newWait = (lastBlock.height + BLOCKSTEP) | |
137 | 137 | let newPlotSize = (plotSize - 1) | |
138 | 138 | if ((0 >= plotSize)) | |
139 | 139 | then throw("Plot is empty, buy new!") | |
140 | 140 | else if ((wait > lastBlock.height)) | |
141 | 141 | then throw((("Wait block " + toString(wait)) + " for mining again")) | |
142 | 142 | else [IntegerEntry(("wait_" + caller), newWait), ScriptTransfer(i.caller, 1000, gLump), IntegerEntry(("plot_" + caller), newPlotSize)] | |
143 | 143 | } | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | ||
147 | 147 | @Callable(i) | |
148 | 148 | func giveIngot (uid) = { | |
149 | 149 | let caller = toBase58String(i.caller.bytes) | |
150 | 150 | let assetId = match getString(this, ("ingot_" + toString(uid))) { | |
151 | 151 | case a: String => | |
152 | 152 | a | |
153 | 153 | case _ => | |
154 | 154 | "" | |
155 | 155 | } | |
156 | 156 | let given = match getInteger(this, ("from_by_" + caller)) { | |
157 | 157 | case a: Int => | |
158 | 158 | a | |
159 | 159 | case _ => | |
160 | 160 | 0 | |
161 | 161 | } | |
162 | 162 | let weight = match getInteger(this, ("weight_" + assetId)) { | |
163 | 163 | case a: Int => | |
164 | 164 | a | |
165 | 165 | case _ => | |
166 | 166 | 0 | |
167 | 167 | } | |
168 | 168 | let maxq = match getInteger(this, "max_q") { | |
169 | 169 | case a: Int => | |
170 | 170 | a | |
171 | 171 | case _ => | |
172 | 172 | 0 | |
173 | 173 | } | |
174 | 174 | let newGiven = (given + weight) | |
175 | 175 | let newMaxQ = newGiven | |
176 | 176 | if ((size(i.payments) == 0)) | |
177 | 177 | then throw("NFT Payment wasn't attached") | |
178 | 178 | else if ((assetId == "")) | |
179 | 179 | then throw(("Can't find INGOT" + toString(uid))) | |
180 | 180 | else { | |
181 | 181 | let payment = i.payments[0] | |
182 | 182 | if ((isDefined(payment.assetId) == false)) | |
183 | 183 | then throw("???") | |
184 | 184 | else if ((payment.assetId != fromBase58String(assetId))) | |
185 | 185 | then throw(("Wrong Ingot in Payment " + assetId)) | |
186 | 186 | else if ((payment.amount != 1)) | |
187 | 187 | then throw("Wrong ingot's count") | |
188 | 188 | else if ((newMaxQ > maxq)) | |
189 | 189 | then [IntegerEntry("max_q", newMaxQ), StringEntry("max_owner", caller), IntegerEntry(("from_by_" + caller), newGiven)] | |
190 | 190 | else [IntegerEntry(("from_by_" + caller), newGiven)] | |
191 | 191 | } | |
192 | 192 | } | |
193 | 193 | ||
194 | 194 | ||
195 | 195 | ||
196 | 196 | @Callable(i) | |
197 | 197 | func startNewEpoch () = { | |
198 | 198 | let epoch = match getInteger(this, "epoch") { | |
199 | 199 | case a: Int => | |
200 | 200 | a | |
201 | 201 | case _ => | |
202 | 202 | -1 | |
203 | 203 | } | |
204 | 204 | let maxOwner = match getString(this, "max_owner") { | |
205 | 205 | case a: String => | |
206 | 206 | a | |
207 | 207 | case _ => | |
208 | 208 | "" | |
209 | 209 | } | |
210 | 210 | if ((i.caller.bytes != DAPP)) | |
211 | 211 | then throw("Only Creator of the world can start new Epoch") | |
212 | 212 | else { | |
213 | 213 | let newEpoch = (epoch + 1) | |
214 | 214 | let nextEpochHeight = (lastBlock.height + BLOCKSTEP) | |
215 | 215 | if ((maxOwner == "")) | |
216 | 216 | then [IntegerEntry("epoch", newEpoch), IntegerEntry("epochHeight", nextEpochHeight)] | |
217 | 217 | else { | |
218 | 218 | let issueName = ("CROWN" + toString(epoch)) | |
219 | 219 | let issueDesc = (((("{\"king\":" + maxOwner) + ",\"epoch\":") + toString(epoch)) + "}") | |
220 | 220 | let issue = Issue(issueName, issueDesc, 1, 0, false) | |
221 | 221 | let nft = calculateAssetId(issue) | |
222 | - | [ScriptTransfer(addressFromStringValue(maxOwner), 1, nft), IntegerEntry("epoch", newEpoch), IntegerEntry("epochHeight", nextEpochHeight)] | |
222 | + | [Issue(issueName, issueDesc, 1, 0, false), ScriptTransfer(addressFromStringValue(maxOwner), 1, nft), IntegerEntry("epoch", newEpoch), IntegerEntry("epochHeight", nextEpochHeight)] | |
223 | 223 | } | |
224 | 224 | } | |
225 | 225 | } | |
226 | 226 | ||
227 | 227 | ||
228 | 228 | @Verifier(tx) | |
229 | 229 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
230 | 230 |
github/deemru/w8io/169f3d6 87.87 ms ◑