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