tx · Htye1vBYvdfDhQxv5Tk4i6EjdEGeV3q9UHU13gN2VG93 3N1GmyGkFnyV1nasw8wiHz2w2mDboqVYKgr: -0.01000000 Waves 2023.04.16 17:44 [2537245] smart account 3N1GmyGkFnyV1nasw8wiHz2w2mDboqVYKgr > SELF 0.00000000 Waves
{ "type": 13, "id": "Htye1vBYvdfDhQxv5Tk4i6EjdEGeV3q9UHU13gN2VG93", "fee": 1000000, "feeAssetId": null, "timestamp": 1681656316959, "version": 2, "chainId": 84, "sender": "3N1GmyGkFnyV1nasw8wiHz2w2mDboqVYKgr", "senderPublicKey": "65hzuFUkGbK4ByCuwohhXNsXhPi8PJUcoxwkbSXXdrvH", "proofs": [ "3ctuf5s4xbtAQT4EVHevPX6sYHg99Abo9xLoM1iLsAXRQwCcL69GQmjsyiNvSs3tLA16q56pTjSquWPsYQm7JGtR" ], "script": "base64:AAIFAAAAAAAAABAIAhIFCgMICAgSBQoDCAgIAAAAAQEAAAAHZ2V0RGF0YQAAAAIAAAADYWRyAAAAA2tleQQAAAAEZGF0YQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAANhZHIFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAgAAAAAFAAAABGRhdGEAAAACAAAAAWkBAAAAB3N0YXR1czIAAAADAAAAC3Bvc2l0aW9uS2V5AAAAD2N1c3RvbWVyQWRkcmVzcwAAABFjdXN0b21lclB1YmxpY0tleQQAAAALcGllbEFkZHJlc3MJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAPcG9zaXRpb25LZXlEYXRhCQEAAAAHZ2V0RGF0YQAAAAIJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAEFAAAAD2N1c3RvbWVyQWRkcmVzcwUAAAALcG9zaXRpb25LZXkEAAAAEHBvc2l0aW9uS2V5U3BsaXQJAAS1AAAAAgUAAAALcG9zaX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ASwAAAACBQAAABFjdXN0b21lclB1YmxpY0tleQIAAAAMX3N0YXR1c1RleHRfBQAAAAl0aW1lc3RhbXACAAAAK1N0YWZmZWxwcmVpcyBlbnRzcHJpY2h0IGRlbSBQb3NpdGlvbnNwcmVpcy4FAAAAA25pbAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgUAAAARY3VzdG9tZXJQdWJsaWNLZXkCAAAADF9zdGF0dXNDb2RlXwUAAAAJdGltZXN0YW1wAgAAAAVlcnJvcgkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgUAAAARY3VzdG9tZXJQdWJsaWNLZXkCAAAADF9zdGF0dXNUZXh0XwUAAAAJdGltZXN0YW1wAgAAADFTdGFmZmVscHJlaXMgZW50c3ByaWNodCBuaWNodCBkZW0gUG9zaXRpb25zcHJlaXMuBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleUTSleA=", "height": 2537245, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9y5Nq5dDy891eBu5FB7vC3Tpyy5tkjAW72ubhL6eGZjv Next: F9WE2dnTw2hvg5tp5yA9gx4GvFgFMLryxyU7KpsNhqSw Diff:
Old | New | Differences | |
---|---|---|---|
10 | 10 | } | |
11 | 11 | data | |
12 | 12 | } | |
13 | + | ||
14 | + | ||
15 | + | @Callable(i) | |
16 | + | func status2 (positionKey,customerAddress,customerPublicKey) = { | |
17 | + | let pielAddress = toBase58String(i.caller.bytes) | |
18 | + | let positionKeyData = getData(addressFromStringValue(customerAddress), positionKey) | |
19 | + | let positionKeySplit = split(positionKey, "_") | |
20 | + | let timestamp = positionKeySplit[2] | |
21 | + | let positionQuantity = positionKeySplit[1] | |
22 | + | let priceListForQuantitiesKey = (positionKeySplit[0] + "_hash") | |
23 | + | let priceListForQuantitiesValue = getData(addressFromStringValue(pielAddress), priceListForQuantitiesKey) | |
24 | + | let priceListForQuantitiesValueToList = split(priceListForQuantitiesValue, "_") | |
25 | + | throw(positionQuantity) | |
26 | + | } | |
27 | + | ||
13 | 28 | ||
14 | 29 | ||
15 | 30 | @Callable(i) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func getData (adr,key) = { | |
5 | 5 | let data = match getString(adr, key) { | |
6 | 6 | case a: String => | |
7 | 7 | a | |
8 | 8 | case _ => | |
9 | 9 | "" | |
10 | 10 | } | |
11 | 11 | data | |
12 | 12 | } | |
13 | + | ||
14 | + | ||
15 | + | @Callable(i) | |
16 | + | func status2 (positionKey,customerAddress,customerPublicKey) = { | |
17 | + | let pielAddress = toBase58String(i.caller.bytes) | |
18 | + | let positionKeyData = getData(addressFromStringValue(customerAddress), positionKey) | |
19 | + | let positionKeySplit = split(positionKey, "_") | |
20 | + | let timestamp = positionKeySplit[2] | |
21 | + | let positionQuantity = positionKeySplit[1] | |
22 | + | let priceListForQuantitiesKey = (positionKeySplit[0] + "_hash") | |
23 | + | let priceListForQuantitiesValue = getData(addressFromStringValue(pielAddress), priceListForQuantitiesKey) | |
24 | + | let priceListForQuantitiesValueToList = split(priceListForQuantitiesValue, "_") | |
25 | + | throw(positionQuantity) | |
26 | + | } | |
27 | + | ||
13 | 28 | ||
14 | 29 | ||
15 | 30 | @Callable(i) | |
16 | 31 | func status (positionKey,customerAddress,customerPublicKey) = { | |
17 | 32 | let pielAddress = toBase58String(i.caller.bytes) | |
18 | 33 | let positionKeyData = getData(addressFromStringValue(customerAddress), positionKey) | |
19 | 34 | let positionKeySplit = split(positionKey, "_") | |
20 | 35 | let timestamp = positionKeySplit[2] | |
21 | 36 | let positionQuantity = positionKeySplit[1] | |
22 | 37 | let priceListForQuantitiesKey = (positionKeySplit[0] + "_hash") | |
23 | 38 | let priceListForQuantitiesValue = getData(addressFromStringValue(pielAddress), priceListForQuantitiesKey) | |
24 | 39 | let priceListForQuantitiesValueToList = split(priceListForQuantitiesValue, "_") | |
25 | 40 | let positionQuantityInt = parseIntValue(positionQuantity) | |
26 | 41 | func find (accum,nextValue) = { | |
27 | 42 | let priceListQuantityInt = parseIntValue(nextValue) | |
28 | 43 | if ((positionQuantityInt >= priceListQuantityInt)) | |
29 | 44 | then priceListQuantityInt | |
30 | 45 | else accum | |
31 | 46 | } | |
32 | 47 | ||
33 | 48 | let iterations = size(priceListForQuantitiesValueToList) | |
34 | 49 | let result = { | |
35 | 50 | let $l = priceListForQuantitiesValueToList | |
36 | 51 | let $s = size($l) | |
37 | 52 | let $acc0 = 0 | |
38 | 53 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
39 | 54 | then $a | |
40 | 55 | else find($a, $l[$i]) | |
41 | 56 | ||
42 | 57 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
43 | 58 | then $a | |
44 | 59 | else throw("List size exceeds 10") | |
45 | 60 | ||
46 | 61 | $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) | |
47 | 62 | } | |
48 | 63 | let priceListKey = (((positionKeySplit[0] + "_") + toString(result)) + "_hash") | |
49 | 64 | let data = getData(addressFromStringValue(pielAddress), priceListKey) | |
50 | 65 | if ((data == positionKeyData)) | |
51 | 66 | then [StringEntry(((customerPublicKey + "_statusCode_") + timestamp), "success"), StringEntry(((customerPublicKey + "_statusText_") + timestamp), "Staffelpreis entspricht dem Positionspreis.")] | |
52 | 67 | else [StringEntry(((customerPublicKey + "_statusCode_") + timestamp), "error"), StringEntry(((customerPublicKey + "_statusText_") + timestamp), "Staffelpreis entspricht nicht dem Positionspreis.")] | |
53 | 68 | } | |
54 | 69 | ||
55 | 70 | ||
56 | 71 | @Verifier(tx) | |
57 | 72 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
58 | 73 |
github/deemru/w8io/169f3d6 33.08 ms ◑