tx · 4WqTPsAurkDKw5Pw24HKqiqe5NAqsYYxzrQYnp7YWWFq 3N72SETEKtTuaA3YNVYWgVEmXKrRrZYXHGo: -0.01000000 Waves 2022.12.02 12:16 [2342534] smart account 3N72SETEKtTuaA3YNVYWgVEmXKrRrZYXHGo > SELF 0.00000000 Waves
{ "type": 13, "id": "4WqTPsAurkDKw5Pw24HKqiqe5NAqsYYxzrQYnp7YWWFq", "fee": 1000000, "feeAssetId": null, "timestamp": 1669972582758, "version": 2, "chainId": 84, "sender": "3N72SETEKtTuaA3YNVYWgVEmXKrRrZYXHGo", "senderPublicKey": "Kwu4LYBMntApXv8t7csxV23Kvc3tvak26wMKK56tA4V", "proofs": [ "AYsewqp78B66LqbKJU6qLkrjhjyEpZGXGdS5ER69XGSrEmYKLJQsvJaEyxRqvSxnPhM1SN8qWcDLtXqDSmRDgDu" ], "script": "base64:BgIHCAISAwoBCAABAWkBA2JpZAEJYXVjdGlvbklkBANwbXQJAQV2YWx1ZQEJAJEDAggFAWkIcGF5bWVudHMAAAQNcG10QXNzZXRJZFN0cgMJAQlpc0RlZmluZWQBCAUDcG10B2Fzc2V0SWQJANgEAQkBBXZhbHVlAQgFA3BtdAdhc3NldElkAgVXQVZFUwQQY2FsbGVyQWRkcmVzc1N0cgkA2AQBCAgFAWkGY2FsbGVyBWJ5dGVzBAllbmRIZWlnaHQJARFAZXh0ck5hdGl2ZSgxMDUwKQIFBHRoaXMFCWF1Y3Rpb25JZAQKc3RhcnRQcmljZQkBEUBleHRyTmF0aXZlKDEwNTApAgUEdGhpcwkArAICBQlhdWN0aW9uSWQCC19zdGFydFByaWNlBAxwcmljZUFzc2V0SWQJARFAZXh0ck5hdGl2ZSgxMDUzKQIFBHRoaXMJAKwCAgUJYXVjdGlvbklkAg1fcHJpY2VBc3NldElkBAl3aW5BbW91bnQJAJoIAgUEdGhpcwkArAICBQlhdWN0aW9uSWQCCl93aW5BbW91bnQEBndpbm5lcgkAnQgCBQR0aGlzCQCsAgIFCWF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uZXIECnByaWNlQXNzZXQDAwkAAAIFDHByaWNlQXNzZXRJZAIFV0FWRVMGCQAAAgUMcHJpY2VBc3NldElkAgAFBHVuaXQJANkEAQUMcHJpY2VBc3NldElkCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgUJYXVjdGlvbklkAgdfd2lubmVyBRBjYWxsZXJBZGRyZXNzU3RyCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFCWF1Y3Rpb25JZAIKX3dpbkFtb3VudAUOdG90YWxCaWRBbW91bnQJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwUScHJldmlvdXNCaWRkZXJBZGRyCQEFdmFsdWUBBQl3aW5BbW91bnQFCnByaWNlQXNzZXQFA25pbAAfrYLF", "height": 2342534, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: J7GbVs4iwNig74pvzgHJemegPjyxxHpEMzUyaeT7Joz8 Next: 7At5dpMZZ2gyjnm6wrSaFSGoMBVj4pBV1azMnTVPAwZd Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(a) | |
7 | 7 | func bid (b) = { | |
8 | 8 | let c = value(a.payments[0]) | |
9 | 9 | let d = if (isDefined(c.assetId)) | |
10 | 10 | then toBase58String(value(c.assetId)) | |
11 | 11 | else "WAVES" | |
12 | 12 | let e = toBase58String(a.caller.bytes) | |
13 | 13 | let f = getIntegerValue(this, b) | |
14 | 14 | let g = getIntegerValue(this, (b + "_startPrice")) | |
15 | 15 | let h = getStringValue(this, (b + "_priceAssetId")) | |
16 | 16 | let i = getInteger(this, (b + "_winAmount")) | |
17 | 17 | let j = getString(this, (b + "_winner")) | |
18 | 18 | let k = if (isDefined(j)) | |
19 | 19 | then (value(j) == e) | |
20 | 20 | else false | |
21 | 21 | let l = (c.amount + (if (k) | |
22 | 22 | then value(i) | |
23 | 23 | else 0)) | |
24 | 24 | if ((lastBlock.height >= f)) | |
25 | 25 | then throw("Auction already finished") | |
26 | 26 | else if ((h != d)) | |
27 | 27 | then throw((("Bid must be in asset '" + h) + "'")) | |
28 | 28 | else if (if (if (isDefined(i)) | |
29 | 29 | then (value(i) >= l) | |
30 | 30 | else false) | |
31 | 31 | then true | |
32 | 32 | else if (!(isDefined(i))) | |
33 | 33 | then (g >= l) | |
34 | 34 | else false) | |
35 | 35 | then throw(("Bid must be more then " + toString(if (isDefined(i)) | |
36 | 36 | then value(i) | |
37 | 37 | else g))) | |
38 | 38 | else if (if (k) | |
39 | 39 | then true | |
40 | 40 | else !(isDefined(j))) | |
41 | 41 | then [StringEntry((b + "_winner"), e), IntegerEntry((b + "_winAmount"), l)] | |
42 | 42 | else { | |
43 | 43 | let m = addressFromStringValue(value(j)) | |
44 | 44 | let n = if (if ((h == "WAVES")) | |
45 | 45 | then true | |
46 | 46 | else (h == "")) | |
47 | 47 | then unit | |
48 | 48 | else fromBase58String(h) | |
49 | 49 | [StringEntry((b + "_winner"), e), IntegerEntry((b + "_winAmount"), l), ScriptTransfer(m, value(i), n)] | |
50 | 50 | } | |
51 | 51 | } | |
52 | 52 | ||
53 | 53 |
github/deemru/w8io/026f985 19.72 ms ◑