tx · BRy3tyrs2Uq5MSrD5dQT9ukQF4tvTFciVg2hhr5z6HUs

3N1PSeoq2yc1MWP4pXAtVK6VUUE5zvH24gc:  -0.00700000 Waves

2022.08.08 12:06 [2175282] smart account 3N1PSeoq2yc1MWP4pXAtVK6VUUE5zvH24gc > SELF 0.00000000 Waves

{ "type": 13, "id": "BRy3tyrs2Uq5MSrD5dQT9ukQF4tvTFciVg2hhr5z6HUs", "fee": 700000, "feeAssetId": null, "timestamp": 1659949700628, "version": 2, "chainId": 84, "sender": "3N1PSeoq2yc1MWP4pXAtVK6VUUE5zvH24gc", "senderPublicKey": "FqZgs8PK3Pxq9oFfuCik8VrHfas2rFv5KxKwyHXRBafX", "proofs": [ "B6MvVDajX3aRgFtcAgv7ruHcx4FVtznJGLKt74HjTf9vTK9oWVTexbkCtZuaV1cMAJurkkTqi9yqejBQPM4ByTA" ], "script": "base64:AAIFAAAAAAAAAAgIAhIECgIICAAAAAEBAAAAB2dldERhdGEAAAACAAAAA2FkcgAAAANrZXkEAAAABGRhdGEEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAADYWRyBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQIAAAAABQAAAARkYXRhAAAAAQAAAAFpAQAAAAZzdGF0dXMAAAACAAAAC3Bvc2l0aW9uS2V5AAAAC3BpZWxBZGRyZXNzBAAAAA9jdXN0b21lckFkZHJlc3MJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAARY3VzdG9tZXJQdWJsaWNLZXkJAAJYAAAAAQgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5BAAAAA9wb3NpdGlvbktleURhdGEJAQAAAAdnZXREYXRhAAAAAgkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQUAAAAPY3VzdG9tZXJBZGRyZXNzBQAAAAtwb3NpdGlvbktleQQAAAAQcG9zaXRpb25LZXl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MIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleVCPSnU=", "height": 2175282, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 12uePdz9rM412Q1DzkbCadnv7c67KMALpxVL813JL5VJ Next: TwMkmJ7wj8yDKs2qfNjZDdGR9dJmpDHY7WLrRwTj1Cj Diff:
OldNewDifferences
1616 func status (positionKey,pielAddress) = {
1717 let customerAddress = toBase58String(i.caller.bytes)
1818 let customerPublicKey = toBase58String(i.callerPublicKey)
19+ let positionKeyData = getData(addressFromStringValue(customerAddress), positionKey)
1920 let positionKeySplit = split(positionKey, "_")
2021 let positionQuantity = positionKeySplit[1]
2122 let priceListForQuantitiesKey = (positionKeySplit[0] + "_hash")
4647 }
4748 let priceListKey = (((positionKeySplit[0] + "_") + toString(result)) + "_hash")
4849 let data = getData(addressFromStringValue(pielAddress), priceListKey)
49-[StringEntry((positionKeySplit[0] + "_Test"), data), StringEntry((positionKeySplit[0] + "_Test2"), priceListKey)]
50+[StringEntry((positionKeySplit[0] + "_PriceListKey_Data"), data), StringEntry((positionKeySplit[0] + "_Customer_Position_Data"), positionKeyData)]
5051 }
5152
5253
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)
19+ let positionKeyData = getData(addressFromStringValue(customerAddress), positionKey)
1920 let positionKeySplit = split(positionKey, "_")
2021 let positionQuantity = positionKeySplit[1]
2122 let priceListForQuantitiesKey = (positionKeySplit[0] + "_hash")
2223 let priceListForQuantitiesValue = getData(addressFromStringValue(pielAddress), priceListForQuantitiesKey)
2324 let priceListForQuantitiesValueToList = split(priceListForQuantitiesValue, "_")
2425 let positionQuantityInt = parseIntValue(positionQuantity)
2526 func find (accum,nextValue) = {
2627 let priceListQuantityInt = parseIntValue(nextValue)
2728 if ((positionQuantityInt >= priceListQuantityInt))
2829 then priceListQuantityInt
2930 else accum
3031 }
3132
3233 let iterations = size(priceListForQuantitiesValueToList)
3334 let result = {
3435 let $l = priceListForQuantitiesValueToList
3536 let $s = size($l)
3637 let $acc0 = 0
3738 func $f0_1 ($a,$i) = if (($i >= $s))
3839 then $a
3940 else find($a, $l[$i])
4041
4142 func $f0_2 ($a,$i) = if (($i >= $s))
4243 then $a
4344 else throw("List size exceeds 5")
4445
4546 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
4647 }
4748 let priceListKey = (((positionKeySplit[0] + "_") + toString(result)) + "_hash")
4849 let data = getData(addressFromStringValue(pielAddress), priceListKey)
49-[StringEntry((positionKeySplit[0] + "_Test"), data), StringEntry((positionKeySplit[0] + "_Test2"), priceListKey)]
50+[StringEntry((positionKeySplit[0] + "_PriceListKey_Data"), data), StringEntry((positionKeySplit[0] + "_Customer_Position_Data"), positionKeyData)]
5051 }
5152
5253
5354 @Verifier(tx)
5455 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
5556

github/deemru/w8io/169f3d6 
73.32 ms