tx · HQRGpxVMqz4f9tjwMYguuitMVYM9vegs5Wu2w3L7HBLb 3MxssetYXJfiGwzo9pqChsSwYj3tCYq5FFH: -0.01700000 Waves 2022.11.03 11:33 [2300697] smart account 3MxssetYXJfiGwzo9pqChsSwYj3tCYq5FFH > SELF 0.00000000 Waves
{ "type": 13, "id": "HQRGpxVMqz4f9tjwMYguuitMVYM9vegs5Wu2w3L7HBLb", "fee": 1700000, "feeAssetId": null, "timestamp": 1667464424185, "version": 2, "chainId": 84, "sender": "3MxssetYXJfiGwzo9pqChsSwYj3tCYq5FFH", "senderPublicKey": "46sMMaC9rMPQdyTE87RpcnevTY9oheuDqzfnuQzoyCtv", "proofs": [ "3deB3e8rsS4QfiUsxEBW4iv9MYktCd3efisgNvYYe1SkTG6XQQxw4UkdageRgDQtjm9py6kRXUps8daRSsKMLVGv" ], "script": "base64:AAIFAAAAAAAAAEEIAhILCgkBAQEBAQgBAQgSAwoBARIDCgEIEgUKAwEICBIECgIBCBIGCgQBCAECEgQKAgEYEgUKAwgIARIECgIBCAAAADYBAAAAEWdldEludGVnZXJPclRocm93AAAAAgAAAAdhZGRyZXNzAAAAA2tleQkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAEGgAAAAIFAAAAB2FkZHJlc3MFAAAAA2tleQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAMQ2FuJ3QgcmVhZCAnBQAAAANrZXkCAAAADScgYXQgYWRkcmVzcyAJAAQlAAAAAQUAAAAHYWRkcmVzcwEAAAAQZ2V0U3RyaW5nT3JUaHJvdwAAAAIAAAAHYWRkcmVzcwAAAANrZXkJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABB0AAAACBQAAAAdhZGRyZXNzBQAAAANrZXkJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAADENhbid0IHJlYWQgJwUAAAADa2V5AgAAAA0nIGF0IGFkZHJlc3MgCQAEJQAAAAEFAAAAB2FkZHJlc3MBAAA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AA0kdDAxNDU2OTE0NjI2AAAAAl8yAwkBAAAAAiE9AAAAAgUAAAAQY3VycmVudEF1Y3Rpb25JZAUAAAAJYXVjdGlvbklkCQAAAgAAAAECAAAAF0F1Y3Rpb24gaXMgYWxyZWFkeSBvdmVyAwkBAAAAAiE9AAAAAgUAAAANY3VycmVudFBlcmlvZAUAAAAJUEhBU0VfQklECQAAAgAAAAECAAAAGkJpZCBwZXJpb2QgaXMgYWxyZWFkeSBvdmVyAwkBAAAAASEAAAABCQEAAAAJaXNEZWZpbmVkAAAAAQUAAAADYmlkCQAAAgAAAAEJAAEsAAAAAgkAASwAAAACAgAAAAlCaWQgd2l0aCAFAAAABGhhc2gCAAAACiBub3QgZm91bmQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAAGY2FsbGVyCQEAAAAFdmFsdWUAAAABBQAAAANiaWQFAAAABHVuaXQJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQUAAAAGYmlkS2V5BQAAAANuaWwAAAAAEeRUnA==", "height": 2300697, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DWvFv7tntgivz5BEPSrn5Lk6thB8jnzS4tB3LVvyN1ki Next: C1wpt29cqFPeWhq2Cec4cHju4JW8t4YgB5nqrLPqX7nJ Diff:
Old | New | Differences | |
---|---|---|---|
433 | 433 | } | |
434 | 434 | ||
435 | 435 | ||
436 | - | ||
437 | - | @Callable(inv) | |
438 | - | func calcHashall (name,amount,bidSender,secret) = { | |
439 | - | let hash = toBase58String(blake2b256_16Kb(keccak256_16Kb((((toBytes(name) + toBytes(amount)) + fromBase58String(bidSender)) + secret)))) | |
440 | - | [StringEntry("hash", hash)] | |
441 | - | } | |
442 | - | ||
443 | - |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func getIntegerOrThrow (address,key) = valueOrErrorMessage(getInteger(address, key), ((("Can't read '" + key) + "' at address ") + toString(address))) | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func getStringOrThrow (address,key) = valueOrErrorMessage(getString(address, key), ((("Can't read '" + key) + "' at address ") + toString(address))) | |
8 | 8 | ||
9 | 9 | ||
10 | 10 | func getIntegerOrDefault (address,key,default) = valueOrElse(getInteger(address, key), default) | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func parseIntOrThrow (maybeInt) = valueOrErrorMessage(parseInt(maybeInt), (("Can't parse integer from '" + maybeInt) + "'")) | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func parseAddressOrThrow (maybeAddress) = valueOrErrorMessage(addressFromString(maybeAddress), (("Can't parse address from '" + maybeAddress) + "'")) | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func parseIntOrDefault (maybeInt,default) = valueOrElse(parseInt(maybeInt), default) | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func key_entity (name,pk,property) = ((((name + "_") + pk) + "_") + property) | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func key_top (name) = ("Top_" + name) | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func key_top2 (name) = ("Top2_" + name) | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | func key_bidderHash (auctionId,address,hash) = ((((auctionId + "_") + address) + "_") + hash) | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func key_bid (bidderHash) = ("Bid_" + bidderHash) | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func key_reveal (bidderHash) = ("Reveal_" + bidderHash) | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func key_referrer (bidderHash) = ("Referrer_" + bidderHash) | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func key_referrerAddress (name) = (("Referrer_" + name) + "_address") | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func key_referrerPercent (name) = (("Referrer_" + name) + "_percent") | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | let key_initTimestamp = "initTimestamp" | |
50 | 50 | ||
51 | 51 | let key_bidDuration = "bidDuration" | |
52 | 52 | ||
53 | 53 | let key_revealDuration = "revealDuration" | |
54 | 54 | ||
55 | 55 | let key_errorFee = "errorFee" | |
56 | 56 | ||
57 | 57 | let key_minimalBid = "minimalBid" | |
58 | 58 | ||
59 | 59 | let key_registrarAddress = "registrarAddress" | |
60 | 60 | ||
61 | 61 | let key_nameMinimalLength = "nameMinimalLength" | |
62 | 62 | ||
63 | 63 | let key_percentRate = "percentRate" | |
64 | 64 | ||
65 | 65 | let key_collectorAddress = "collectorAddress" | |
66 | 66 | ||
67 | 67 | let auctionStart = getIntegerOrThrow(this, key_initTimestamp) | |
68 | 68 | ||
69 | 69 | let bidDuration = getIntegerOrThrow(this, key_bidDuration) | |
70 | 70 | ||
71 | 71 | let revealDuration = getIntegerOrThrow(this, key_revealDuration) | |
72 | 72 | ||
73 | 73 | let auctionDuration = (bidDuration + revealDuration) | |
74 | 74 | ||
75 | 75 | let errorFee = getIntegerOrThrow(this, key_errorFee) | |
76 | 76 | ||
77 | 77 | let minimalBid = getIntegerOrThrow(this, key_minimalBid) | |
78 | 78 | ||
79 | 79 | let nameMinimalLength = getIntegerOrThrow(this, key_nameMinimalLength) | |
80 | 80 | ||
81 | 81 | let percentRate = getIntegerOrThrow(this, key_percentRate) | |
82 | 82 | ||
83 | 83 | let registrarAddress = getStringOrThrow(this, key_registrarAddress) | |
84 | 84 | ||
85 | 85 | let registrar = parseAddressOrThrow(registrarAddress) | |
86 | 86 | ||
87 | 87 | let collectorAddress = getStringOrThrow(this, key_collectorAddress) | |
88 | 88 | ||
89 | 89 | let collector = parseAddressOrThrow(collectorAddress) | |
90 | 90 | ||
91 | 91 | func _getReferrerData (referrerName) = { | |
92 | 92 | let refAddress = parseAddressOrThrow(getStringOrThrow(this, key_referrerAddress(referrerName))) | |
93 | 93 | let refPercent = valueOrElse(getInteger(this, key_referrerPercent(referrerName)), percentRate) | |
94 | 94 | if (if ((0 > refPercent)) | |
95 | 95 | then true | |
96 | 96 | else (refPercent > 100)) | |
97 | 97 | then throw("Incorrect percent rate") | |
98 | 98 | else $Tuple2(refAddress, refPercent) | |
99 | 99 | } | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func _referrerPercentTransfer (bidderHashKey,bidAmount) = { | |
103 | 103 | let bidReferrerKey = key_referrer(bidderHashKey) | |
104 | 104 | let bidReferrerName = getString(this, bidReferrerKey) | |
105 | 105 | if (isDefined(bidReferrerName)) | |
106 | 106 | then { | |
107 | 107 | let $t032073282 = _getReferrerData(value(bidReferrerName)) | |
108 | 108 | let referrer = $t032073282._1 | |
109 | 109 | let referrerPercent = $t032073282._2 | |
110 | 110 | [ScriptTransfer(referrer, fraction(bidAmount, referrerPercent, 100), unit), DeleteEntry(bidReferrerKey)] | |
111 | 111 | } | |
112 | 112 | else nil | |
113 | 113 | } | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func calcHash (name,amount,bidSender,secret) = toBase58String(blake2b256_16Kb(keccak256_16Kb((((toBytes(name) + toBytes(amount)) + fromBase58String(bidSender)) + secret)))) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func modifiers (validations) = unit | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func isAdmin (inv) = (inv.caller == this) | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func onlyAdmin (inv) = if (isAdmin(inv)) | |
126 | 126 | then unit | |
127 | 127 | else throw("Permission denied") | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func onlyValidAddress (maybeAddress) = if (isDefined(addressFromString(maybeAddress))) | |
131 | 131 | then unit | |
132 | 132 | else throw((maybeAddress + " is not a valid address")) | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func onlyPositiveInt (number,variable) = if ((number > 0)) | |
136 | 136 | then unit | |
137 | 137 | else throw((variable + " must be greter than 0")) | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | let PHASE_BID = "BID" | |
141 | 141 | ||
142 | 142 | let PHASE_REVEAL = "REVEAL" | |
143 | 143 | ||
144 | 144 | func _getAuctionById (auctionId) = { | |
145 | 145 | let bidStart = (auctionStart + (auctionId * auctionDuration)) | |
146 | 146 | let revealStart = (bidStart + bidDuration) | |
147 | 147 | let auctionEnd = (revealStart + revealDuration) | |
148 | 148 | let phase = if ((lastBlock.timestamp > revealStart)) | |
149 | 149 | then PHASE_REVEAL | |
150 | 150 | else PHASE_BID | |
151 | 151 | $Tuple5(auctionId, phase, bidStart, revealStart, auctionEnd) | |
152 | 152 | } | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | func getAuction () = { | |
156 | 156 | let auctionId = ((lastBlock.timestamp - auctionStart) / auctionDuration) | |
157 | 157 | _getAuctionById(auctionId) | |
158 | 158 | } | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | func getAuctionPhase () = match getAuction() { | |
162 | 162 | case auction: (Int, String, Int, Int, Int) => | |
163 | 163 | let auctionId = auction._1 | |
164 | 164 | let phase = auction._2 | |
165 | 165 | $Tuple2(auctionId, phase) | |
166 | 166 | case _ => | |
167 | 167 | throw("Invalid auction info") | |
168 | 168 | } | |
169 | 169 | ||
170 | 170 | ||
171 | 171 | func isValidName (name) = { | |
172 | 172 | let isValid = match invoke(registrar, "isValid", [name], nil) { | |
173 | 173 | case a: Boolean => | |
174 | 174 | a | |
175 | 175 | case _ => | |
176 | 176 | throw("Unsupported result format (available)") | |
177 | 177 | } | |
178 | 178 | if (isValid) | |
179 | 179 | then (size(name) >= nameMinimalLength) | |
180 | 180 | else false | |
181 | 181 | } | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | func isRegistrableName (name) = match invoke(registrar, "isAvailable", [name], nil) { | |
185 | 185 | case a: Boolean => | |
186 | 186 | a | |
187 | 187 | case _ => | |
188 | 188 | throw("Unsupported result format (available)") | |
189 | 189 | } | |
190 | 190 | ||
191 | 191 | ||
192 | 192 | func isWinnableName (name) = { | |
193 | 193 | let revealKey = getString(this, key_top(name)) | |
194 | 194 | if (!(isDefined(revealKey))) | |
195 | 195 | then true | |
196 | 196 | else { | |
197 | 197 | let currentAuction = getAuctionPhase()._1 | |
198 | 198 | let topAuctionId = split(value(revealKey), "_")[1] | |
199 | 199 | let auctionId = parseIntOrDefault(topAuctionId, 0) | |
200 | 200 | (auctionId == currentAuction) | |
201 | 201 | } | |
202 | 202 | } | |
203 | 203 | ||
204 | 204 | ||
205 | 205 | func isAvailableName (name) = if (if (isRegistrableName(name)) | |
206 | 206 | then isWinnableName(name) | |
207 | 207 | else false) | |
208 | 208 | then isValidName(name) | |
209 | 209 | else false | |
210 | 210 | ||
211 | 211 | ||
212 | 212 | func _bid (inv,auctionId,hash) = { | |
213 | 213 | let pmt = if (if ((size(inv.payments) == 1)) | |
214 | 214 | then (inv.payments[0].assetId == unit) | |
215 | 215 | else false) | |
216 | 216 | then inv.payments[0].amount | |
217 | 217 | else throw("Single payment required") | |
218 | 218 | let callerAddress = toString(inv.caller) | |
219 | 219 | let bidKey = key_bid(key_bidderHash(toString(auctionId), callerAddress, hash)) | |
220 | 220 | let $t062776334 = getAuctionPhase() | |
221 | 221 | let currentAuctionId = $t062776334._1 | |
222 | 222 | let currentPeriod = $t062776334._2 | |
223 | 223 | if ((currentAuctionId != auctionId)) | |
224 | 224 | then throw("Auctions is already over") | |
225 | 225 | else if ((currentPeriod != PHASE_BID)) | |
226 | 226 | then throw("Bid period is over") | |
227 | 227 | else if (isDefined(getInteger(this, bidKey))) | |
228 | 228 | then throw("Bid with exact amount already presented") | |
229 | 229 | else [IntegerEntry(bidKey, pmt)] | |
230 | 230 | } | |
231 | 231 | ||
232 | 232 | ||
233 | 233 | @Callable(inv) | |
234 | 234 | func init (timestamp,bidDuration,revealDuration,errorFee,minimalBid,registrarAddress,nameMinimalLength,percentRate,collectorAddress) = valueOrElse(modifiers([onlyAdmin(inv), if (!(isDefined(getInteger(this, key_initTimestamp)))) | |
235 | 235 | then unit | |
236 | 236 | else throw("Auction already has been initialized"), onlyValidAddress(registrarAddress), onlyValidAddress(collectorAddress), onlyPositiveInt(bidDuration, "Bid duration"), onlyPositiveInt(revealDuration, "Reveal duration"), onlyPositiveInt(errorFee, "Error fee"), onlyPositiveInt(minimalBid, "Minimal bid"), onlyPositiveInt(percentRate, "Percent rate"), if ((nameMinimalLength > 3)) | |
237 | 237 | then unit | |
238 | 238 | else throw("Minimal name length must be more than 3")]), [IntegerEntry(key_initTimestamp, timestamp), IntegerEntry(key_bidDuration, bidDuration), IntegerEntry(key_revealDuration, revealDuration), IntegerEntry(key_errorFee, errorFee), IntegerEntry(key_minimalBid, minimalBid), StringEntry(key_registrarAddress, registrarAddress), IntegerEntry(key_nameMinimalLength, nameMinimalLength), IntegerEntry(key_percentRate, percentRate), StringEntry(key_collectorAddress, collectorAddress)]) | |
239 | 239 | ||
240 | 240 | ||
241 | 241 | ||
242 | 242 | @Callable(inv) | |
243 | 243 | func getAuctionById (auctionId) = $Tuple2(nil, _getAuctionById(auctionId)) | |
244 | 244 | ||
245 | 245 | ||
246 | 246 | ||
247 | 247 | @Callable(inv) | |
248 | 248 | func isAvailable (name) = $Tuple2(nil, isAvailableName(name)) | |
249 | 249 | ||
250 | 250 | ||
251 | 251 | ||
252 | 252 | @Callable(inv) | |
253 | 253 | func bidWithReferrer (auctionId,hash,referrerName) = valueOrElse(modifiers([if (isDefined(getString(this, key_referrerAddress(referrerName)))) | |
254 | 254 | then unit | |
255 | 255 | else throw((("Referrer `" + referrerName) + "` not found"))]), { | |
256 | 256 | let bid = _bid(inv, auctionId, hash) | |
257 | 257 | let commitBidReferrer = [StringEntry(key_referrer(key_bidderHash(toString(auctionId), toString(inv.caller), hash)), referrerName)] | |
258 | 258 | (bid ++ commitBidReferrer) | |
259 | 259 | }) | |
260 | 260 | ||
261 | 261 | ||
262 | 262 | ||
263 | 263 | @Callable(inv) | |
264 | 264 | func bid (auctionId,hash) = _bid(inv, auctionId, hash) | |
265 | 265 | ||
266 | 266 | ||
267 | 267 | ||
268 | 268 | @Callable(inv) | |
269 | 269 | func reveal (auctionId,name,bidAmount,secret) = { | |
270 | 270 | let caller = inv.caller | |
271 | 271 | let callerAddress = toString(caller) | |
272 | 272 | let hash = calcHash(name, bidAmount, callerAddress, secret) | |
273 | 273 | let bidderHashKey = key_bidderHash(toString(auctionId), callerAddress, hash) | |
274 | 274 | let revealKey = key_reveal(bidderHashKey) | |
275 | 275 | let $t092279284 = getAuctionPhase() | |
276 | 276 | let currentAuctionId = $t092279284._1 | |
277 | 277 | let currentPeriod = $t092279284._2 | |
278 | 278 | if ((currentAuctionId != auctionId)) | |
279 | 279 | then throw("Auctions is already over") | |
280 | 280 | else if ((currentPeriod != PHASE_REVEAL)) | |
281 | 281 | then throw("Reveal period is over") | |
282 | 282 | else if (isDefined(getString(this, revealKey))) | |
283 | 283 | then throw("Bid is already revealed") | |
284 | 284 | else { | |
285 | 285 | let bidKey = key_bid(bidderHashKey) | |
286 | 286 | let deposit = valueOrErrorMessage(getInteger(this, bidKey), ("Bid doesn't exists " + hash)) | |
287 | 287 | let topKey = key_top(name) | |
288 | 288 | let topKeyData = getString(this, topKey) | |
289 | 289 | let isValidBid = if (if ((bidAmount >= minimalBid)) | |
290 | 290 | then (deposit >= bidAmount) | |
291 | 291 | else false) | |
292 | 292 | then isAvailableName(name) | |
293 | 293 | else false | |
294 | 294 | let revealedBid = [StringEntry(revealKey, ((((toString(deposit) + ",") + toString(bidAmount)) + ",") + name))] | |
295 | 295 | if (!(isValidBid)) | |
296 | 296 | then { | |
297 | 297 | let feeAmount = fraction(deposit, 10, 100) | |
298 | 298 | let returnDepositWithoutFeeAndDeleteBid = [ScriptTransfer(caller, (deposit - feeAmount), unit), ScriptTransfer(collector, feeAmount, unit), DeleteEntry(bidKey)] | |
299 | 299 | returnDepositWithoutFeeAndDeleteBid | |
300 | 300 | } | |
301 | 301 | else if (isDefined(topKeyData)) | |
302 | 302 | then { | |
303 | 303 | let $t01045410634 = { | |
304 | 304 | let topValues = split(value(topKeyData), ",") | |
305 | 305 | $Tuple2(topValues[0], parseIntValue(topValues[1])) | |
306 | 306 | } | |
307 | 307 | let topRevealKey = $t01045410634._1 | |
308 | 308 | let secondTopBidAmount = $t01045410634._2 | |
309 | 309 | let revealedData = value(getString(this, topRevealKey)) | |
310 | 310 | let topBidAmount = parseIntValue(split(revealedData, ",")[1]) | |
311 | 311 | let $t01080311103 = if ((bidAmount > topBidAmount)) | |
312 | 312 | then $Tuple2(revealKey, topBidAmount) | |
313 | 313 | else if ((bidAmount > secondTopBidAmount)) | |
314 | 314 | then $Tuple2(topRevealKey, bidAmount) | |
315 | 315 | else $Tuple2(unit, unit) | |
316 | 316 | let newTopRevealKey = $t01080311103._1 | |
317 | 317 | let newSecondBidAmount = $t01080311103._2 | |
318 | 318 | let updateTopKey = match $Tuple2(newTopRevealKey, newSecondBidAmount) { | |
319 | 319 | case newTopData: (String, Int) => | |
320 | 320 | [StringEntry(topKey, ((newTopData._1 + ",") + toString(newTopData._2)))] | |
321 | 321 | case _ => | |
322 | 322 | nil | |
323 | 323 | } | |
324 | 324 | (revealedBid ++ updateTopKey) | |
325 | 325 | } | |
326 | 326 | else { | |
327 | 327 | let newTopBidder = [StringEntry(topKey, ((revealKey + ",") + toString(minimalBid)))] | |
328 | 328 | (revealedBid ++ newTopBidder) | |
329 | 329 | } | |
330 | 330 | } | |
331 | 331 | } | |
332 | 332 | ||
333 | 333 | ||
334 | 334 | ||
335 | 335 | @Callable(inv) | |
336 | 336 | func finalize (auctionId,hashes) = { | |
337 | 337 | let auctionEnd = _getAuctionById(auctionId)._5 | |
338 | 338 | let err = if ((lastBlock.timestamp > auctionEnd)) | |
339 | 339 | then unit | |
340 | 340 | else throw("Cannot finalize auction that has not ended") | |
341 | 341 | if ((err == err)) | |
342 | 342 | then { | |
343 | 343 | let caller = inv.caller | |
344 | 344 | let callerAddress = toString(caller) | |
345 | 345 | func foldRefund (acc,hash) = { | |
346 | 346 | let bidderHashKey = key_bidderHash(toString(auctionId), callerAddress, hash) | |
347 | 347 | let bidKey = key_bid(bidderHashKey) | |
348 | 348 | let revealKey = key_reveal(bidderHashKey) | |
349 | 349 | let revealedBid = getString(this, revealKey) | |
350 | 350 | let $t01223512536 = { | |
351 | 351 | let bidValues = split(valueOrErrorMessage(revealedBid, (("Bid with hash " + hash) + " not found")), ",") | |
352 | 352 | $Tuple3(parseIntValue(bidValues[0]), parseIntValue(bidValues[1]), bidValues[2]) | |
353 | 353 | } | |
354 | 354 | let deposit = $t01223512536._1 | |
355 | 355 | let bidAmount = $t01223512536._2 | |
356 | 356 | let name = $t01223512536._3 | |
357 | 357 | let topKey = key_top(name) | |
358 | 358 | let topKeyData = getString(this, topKey) | |
359 | 359 | let $t01262912797 = { | |
360 | 360 | let topValues = split(value(topKeyData), ",") | |
361 | 361 | $Tuple2(topValues[0], parseIntValue(topValues[1])) | |
362 | 362 | } | |
363 | 363 | let topRevealKey = $t01262912797._1 | |
364 | 364 | let secondTopBidAmount = $t01262912797._2 | |
365 | 365 | let $t01280712969 = { | |
366 | 366 | let winnerInfo = split(topRevealKey, "_") | |
367 | 367 | $Tuple2(parseIntValue(winnerInfo[1]), winnerInfo[2]) | |
368 | 368 | } | |
369 | 369 | let winnerAuctionId = $t01280712969._1 | |
370 | 370 | let winnerAddress = $t01280712969._2 | |
371 | 371 | let deleteEntries = [DeleteEntry(revealKey), DeleteEntry(bidKey)] | |
372 | 372 | let transferAndDeleteEntry = if ((topRevealKey == revealKey)) | |
373 | 373 | then { | |
374 | 374 | let referrerTransfer = _referrerPercentTransfer(bidderHashKey, secondTopBidAmount) | |
375 | 375 | let claimNft = invoke(registrar, "register", [name, winnerAddress, auctionEnd], nil) | |
376 | 376 | if ((claimNft == claimNft)) | |
377 | 377 | then { | |
378 | 378 | let transferDelta = [ScriptTransfer(caller, (deposit - secondTopBidAmount), unit), ScriptTransfer(collector, secondTopBidAmount, unit)] | |
379 | 379 | (referrerTransfer ++ transferDelta) | |
380 | 380 | } | |
381 | 381 | else throw("Strict value is not equal to itself.") | |
382 | 382 | } | |
383 | 383 | else [ScriptTransfer(caller, deposit, unit)] | |
384 | 384 | ((acc ++ deleteEntries) ++ transferAndDeleteEntry) | |
385 | 385 | } | |
386 | 386 | ||
387 | 387 | let $l = hashes | |
388 | 388 | let $s = size($l) | |
389 | 389 | let $acc0 = nil | |
390 | 390 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
391 | 391 | then $a | |
392 | 392 | else foldRefund($a, $l[$i]) | |
393 | 393 | ||
394 | 394 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
395 | 395 | then $a | |
396 | 396 | else throw("List size exceeds 10") | |
397 | 397 | ||
398 | 398 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
399 | 399 | } | |
400 | 400 | else throw("Strict value is not equal to itself.") | |
401 | 401 | } | |
402 | 402 | ||
403 | 403 | ||
404 | 404 | ||
405 | 405 | @Callable(inv) | |
406 | 406 | func addReferrer (referrerName,referrerAddress,percent) = valueOrElse(modifiers([onlyAdmin(inv), onlyValidAddress(referrerAddress), if (if ((percent > 0)) | |
407 | 407 | then (100 > percent) | |
408 | 408 | else false) | |
409 | 409 | then unit | |
410 | 410 | else throw("Percent must be between 0 and 100"), if ((size(referrerName) > 0)) | |
411 | 411 | then unit | |
412 | 412 | else throw("Referrer name cannot be empty")]), [StringEntry(key_referrerAddress(referrerName), referrerAddress), IntegerEntry(key_referrerPercent(referrerName), percent)]) | |
413 | 413 | ||
414 | 414 | ||
415 | 415 | ||
416 | 416 | @Callable(inv) | |
417 | 417 | func revokeBid (auctionId,hash) = { | |
418 | 418 | let caller = inv.caller | |
419 | 419 | let callerStr = toString(caller) | |
420 | 420 | let bidderHashKey = key_bidderHash(toString(auctionId), callerStr, hash) | |
421 | 421 | let bidKey = key_bid(bidderHashKey) | |
422 | 422 | let bid = getInteger(this, bidKey) | |
423 | 423 | let $t01456914626 = getAuctionPhase() | |
424 | 424 | let currentAuctionId = $t01456914626._1 | |
425 | 425 | let currentPeriod = $t01456914626._2 | |
426 | 426 | if ((currentAuctionId != auctionId)) | |
427 | 427 | then throw("Auction is already over") | |
428 | 428 | else if ((currentPeriod != PHASE_BID)) | |
429 | 429 | then throw("Bid period is already over") | |
430 | 430 | else if (!(isDefined(bid))) | |
431 | 431 | then throw((("Bid with " + hash) + " not found")) | |
432 | 432 | else [ScriptTransfer(caller, value(bid), unit), DeleteEntry(bidKey)] | |
433 | 433 | } | |
434 | 434 | ||
435 | 435 | ||
436 | - | ||
437 | - | @Callable(inv) | |
438 | - | func calcHashall (name,amount,bidSender,secret) = { | |
439 | - | let hash = toBase58String(blake2b256_16Kb(keccak256_16Kb((((toBytes(name) + toBytes(amount)) + fromBase58String(bidSender)) + secret)))) | |
440 | - | [StringEntry("hash", hash)] | |
441 | - | } | |
442 | - | ||
443 | - |
github/deemru/w8io/026f985 45.38 ms ◑