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:AAIFAAAAAAAAAAgIAhIECgIICAAAAAEBAAAAB2dldERhdGEAAAACAAAAA2FkcgAAAANrZXkEAAAABGRhdGEEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAADYWRyBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQIAAAAABQAAAARkYXRhAAAAAQAAAAFpAQAAAAZzdGF0dXMAAAACAAAAC3Bvc2l0aW9uS2V5AAAAC3BpZWxBZGRyZXNzBAAAAA9jdXN0b21lckFkZHJlc3MJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAARY3VzdG9tZXJQdWJsaWNLZXkJAAJYAAAAAQgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5BAAAABBwb3NpdGlvbktleVNwbGl0CQAEtQAAAAIFAAAAC3Bvc2l0aW9uS2V5AgAAAAFfBAAAABBwb3NpdGlvblF1YW50aXR5CQABkQAAAAIFAAAAEHBvc2l0aW9uS2V5U3BsaXQAAAAAAAAAAAEEAAAAGXByaWNlTGlz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AAAABSRmMF8yAAAAAgAAAAIkYQAAAAIkaQMJAABnAAAAAgUAAAACJGkFAAAAAiRzBQAAAAIkYQkAAAIAAAABAgAAABNMaXN0IHNpemUgZXhjZWVkcyA1CQEAAAAFJGYwXzIAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACBQAAAAUkYWNjMAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAgAAAAAAAAAAAwAAAAAAAAAABAAAAAAAAAAABQQAAAAMcHJpY2VMaXN0S2V5CQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABkQAAAAIFAAAAEHBvc2l0aW9uS2V5U3BsaXQAAAAAAAAAAAACAAAAAV8JAAGkAAAAAQUAAAAGcmVzdWx0AgAAAAVfaGFzaAQAAAAEZGF0YQkBAAAAB2dldERhdGEAAAACCQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABBQAAAAtwaWVsQWRkcmVzcwUAAAAMcHJpY2VMaXN0S2V5CQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAEsAAAAAgkAAZEAAAACBQAAABBwb3NpdGlvbktleVNwbGl0AAAAAAAAAAAAAgAAAAVfVGVzdAUAAAAEZGF0YQkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIJAAGRAAAAAgUAAAAQcG9zaXRpb25LZXlTcGxpdAAAAAAAAAAAAAIAAAAGX1Rlc3QyBQAAAAxwcmljZUxpc3RLZXkFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5Nwa6Fw==", "height": 2175278, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CMQ4911aa8vwtLiiNC3ecH4DVBav3k2mK7xevFyuWajS Next: BRy3tyrs2Uq5MSrD5dQT9ukQF4tvTFciVg2hhr5z6HUs Diff:
OldNewDifferences
2525 func find (accum,nextValue) = {
2626 let priceListQuantityInt = parseIntValue(nextValue)
2727 if ((positionQuantityInt >= priceListQuantityInt))
28- then positionQuantityInt
28+ then priceListQuantityInt
2929 else accum
3030 }
3131
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getData (adr,key) = {
55 let data = match getString(adr, key) {
66 case a: String =>
77 a
88 case _ =>
99 ""
1010 }
1111 data
1212 }
1313
1414
1515 @Callable(i)
1616 func status (positionKey,pielAddress) = {
1717 let customerAddress = toBase58String(i.caller.bytes)
1818 let customerPublicKey = toBase58String(i.callerPublicKey)
1919 let positionKeySplit = split(positionKey, "_")
2020 let positionQuantity = positionKeySplit[1]
2121 let priceListForQuantitiesKey = (positionKeySplit[0] + "_hash")
2222 let priceListForQuantitiesValue = getData(addressFromStringValue(pielAddress), priceListForQuantitiesKey)
2323 let priceListForQuantitiesValueToList = split(priceListForQuantitiesValue, "_")
2424 let positionQuantityInt = parseIntValue(positionQuantity)
2525 func find (accum,nextValue) = {
2626 let priceListQuantityInt = parseIntValue(nextValue)
2727 if ((positionQuantityInt >= priceListQuantityInt))
28- then positionQuantityInt
28+ then priceListQuantityInt
2929 else accum
3030 }
3131
3232 let iterations = size(priceListForQuantitiesValueToList)
3333 let result = {
3434 let $l = priceListForQuantitiesValueToList
3535 let $s = size($l)
3636 let $acc0 = 0
3737 func $f0_1 ($a,$i) = if (($i >= $s))
3838 then $a
3939 else find($a, $l[$i])
4040
4141 func $f0_2 ($a,$i) = if (($i >= $s))
4242 then $a
4343 else throw("List size exceeds 5")
4444
4545 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
4646 }
4747 let priceListKey = (((positionKeySplit[0] + "_") + toString(result)) + "_hash")
4848 let data = getData(addressFromStringValue(pielAddress), priceListKey)
4949 [StringEntry((positionKeySplit[0] + "_Test"), data), StringEntry((positionKeySplit[0] + "_Test2"), priceListKey)]
5050 }
5151
5252
5353 @Verifier(tx)
5454 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
5555

github/deemru/w8io/169f3d6 
39.65 ms