tx · 12uePdz9rM412Q1DzkbCadnv7c67KMALpxVL813JL5VJ 3N1PSeoq2yc1MWP4pXAtVK6VUUE5zvH24gc: -0.00600000 Waves 2022.08.08 12:01 [2175278] smart account 3N1PSeoq2yc1MWP4pXAtVK6VUUE5zvH24gc > SELF 0.00000000 Waves
{ "type": 13, "id": "12uePdz9rM412Q1DzkbCadnv7c67KMALpxVL813JL5VJ", "fee": 600000, "feeAssetId": null, "timestamp": 1659949314205, "version": 2, "chainId": 84, "sender": "3N1PSeoq2yc1MWP4pXAtVK6VUUE5zvH24gc", "senderPublicKey": "FqZgs8PK3Pxq9oFfuCik8VrHfas2rFv5KxKwyHXRBafX", "proofs": [ "3nDEqsvYqPzA7HM8EZCbQ8mjsTu1jRyCHVTXNsY2c34TVZVh76DhH1utFexfoeNxdEzuGM1vMm92A1pqwGkpEkwk" ], "script": "base64:AAIFAAAAAAAAAAgIAhIECgIICAAAAAEBAAAAB2dldERhdGEAAAACAAAAA2FkcgAAAANrZXkEAAAABGRhdGEEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAADYWRyBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQIAAAAABQAAAARkYXRhAAAAAQAAAAFpAQAAAAZzdGF0dXMAAAACAAAAC3Bvc2l0aW9uS2V5AAAAC3BpZWxBZGRyZXNzBAAAAA9jdXN0b21lckFkZHJlc3MJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAARY3VzdG9tZXJQdWJsaWNLZXkJAAJYAAAAAQgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5BAAAABBwb3NpdGlvbktleVNwbGl0CQAEtQAAAAIFAAAAC3Bvc2l0aW9uS2V5AgAAAAFfBAAAABBwb3NpdGlvblF1YW50aXR5CQABkQAAAAIFAAAAEHBvc2l0aW9uS2V5U3BsaXQAAAAAAAAAAAEEAAAAGXByaWNlTGlzd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AAABSRmMF8yAAAAAgAAAAIkYQAAAAIkaQMJAABnAAAAAgUAAAACJGkFAAAAAiRzBQAAAAIkYQkAAAIAAAABAgAAABNMaXN0IHNpemUgZXhjZWVkcyA1CQEAAAAFJGYwXzIAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACBQAAAAUkYWNjMAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAgAAAAAAAAAAAwAAAAAAAAAABAAAAAAAAAAABQQAAAAMcHJpY2VMaXN0S2V5CQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABkQAAAAIFAAAAEHBvc2l0aW9uS2V5U3BsaXQAAAAAAAAAAAACAAAAAV8JAAGkAAAAAQUAAAAGcmVzdWx0AgAAAAVfaGFzaAQAAAAEZGF0YQkBAAAAB2dldERhdGEAAAACCQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABBQAAAAtwaWVsQWRkcmVzcwUAAAAMcHJpY2VMaXN0S2V5CQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAEsAAAAAgkAAZEAAAACBQAAABBwb3NpdGlvbktleVNwbGl0AAAAAAAAAAAAAgAAAAVfVGVzdAUAAAAEZGF0YQkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIJAAGRAAAAAgUAAAAQcG9zaXRpb25LZXlTcGxpdAAAAAAAAAAAAAIAAAAGX1Rlc3QyBQAAAAxwcmljZUxpc3RLZXkFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5Nwa6Fw==", "height": 2175278, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CMQ4911aa8vwtLiiNC3ecH4DVBav3k2mK7xevFyuWajS Next: BRy3tyrs2Uq5MSrD5dQT9ukQF4tvTFciVg2hhr5z6HUs Diff:
Old | New | Differences | |
---|---|---|---|
25 | 25 | func find (accum,nextValue) = { | |
26 | 26 | let priceListQuantityInt = parseIntValue(nextValue) | |
27 | 27 | if ((positionQuantityInt >= priceListQuantityInt)) | |
28 | - | then | |
28 | + | then priceListQuantityInt | |
29 | 29 | else accum | |
30 | 30 | } | |
31 | 31 |
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 status (positionKey,pielAddress) = { | |
17 | 17 | let customerAddress = toBase58String(i.caller.bytes) | |
18 | 18 | let customerPublicKey = toBase58String(i.callerPublicKey) | |
19 | 19 | let positionKeySplit = split(positionKey, "_") | |
20 | 20 | let positionQuantity = positionKeySplit[1] | |
21 | 21 | let priceListForQuantitiesKey = (positionKeySplit[0] + "_hash") | |
22 | 22 | let priceListForQuantitiesValue = getData(addressFromStringValue(pielAddress), priceListForQuantitiesKey) | |
23 | 23 | let priceListForQuantitiesValueToList = split(priceListForQuantitiesValue, "_") | |
24 | 24 | let positionQuantityInt = parseIntValue(positionQuantity) | |
25 | 25 | func find (accum,nextValue) = { | |
26 | 26 | let priceListQuantityInt = parseIntValue(nextValue) | |
27 | 27 | if ((positionQuantityInt >= priceListQuantityInt)) | |
28 | - | then | |
28 | + | then priceListQuantityInt | |
29 | 29 | else accum | |
30 | 30 | } | |
31 | 31 | ||
32 | 32 | let iterations = size(priceListForQuantitiesValueToList) | |
33 | 33 | let result = { | |
34 | 34 | let $l = priceListForQuantitiesValueToList | |
35 | 35 | let $s = size($l) | |
36 | 36 | let $acc0 = 0 | |
37 | 37 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
38 | 38 | then $a | |
39 | 39 | else find($a, $l[$i]) | |
40 | 40 | ||
41 | 41 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
42 | 42 | then $a | |
43 | 43 | else throw("List size exceeds 5") | |
44 | 44 | ||
45 | 45 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
46 | 46 | } | |
47 | 47 | let priceListKey = (((positionKeySplit[0] + "_") + toString(result)) + "_hash") | |
48 | 48 | let data = getData(addressFromStringValue(pielAddress), priceListKey) | |
49 | 49 | [StringEntry((positionKeySplit[0] + "_Test"), data), StringEntry((positionKeySplit[0] + "_Test2"), priceListKey)] | |
50 | 50 | } | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | @Verifier(tx) | |
54 | 54 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
55 | 55 |
github/deemru/w8io/169f3d6 39.65 ms ◑