tx · 3MZVHp74UtNN8zmRzaZ4oDNAB6zRj9UzyitCKaVD2Crn

3MzCxx3HQhveT7EPtxKiavzeG5NaWfdWaqG:  -0.01000000 Waves

2023.05.24 15:32 [2592068] smart account 3MzCxx3HQhveT7EPtxKiavzeG5NaWfdWaqG > SELF 0.00000000 Waves

{ "type": 13, "id": "3MZVHp74UtNN8zmRzaZ4oDNAB6zRj9UzyitCKaVD2Crn", "fee": 1000000, "feeAssetId": null, "timestamp": 1684931660360, "version": 2, "chainId": 84, "sender": "3MzCxx3HQhveT7EPtxKiavzeG5NaWfdWaqG", "senderPublicKey": "GsZLD13DqBHEqBVXCDjp7KqkLz78GSfeRJR8LFQnSFzu", "proofs": [ "3YzEfgxGcjsWJJkSDy9hdBfCzBSj6J4ubnaRYAyH8UqtCUsV8SuMza6VzM7bs5NhBvqNPH9J3F68sNAm88Wt4cJx" ], "script": "base64:AAIFAAAAAAAAAB0IAhIAEgUKAwgICBIECgIICBIECgIICBIECgIBAQAAAAMAAAAAA1NFUAIAAAACX18BAAAAA2FicwAAAAEAAAABdgMJAABmAAAAAgAAAAAAAAAAAAUAAAABdgkAAGgAAAACAP//////////BQAAAAF2BQAAAAF2AQAAAARyYW5kAAAAAgAAAARzZWVkAAAAA21heAkAAaQAAAABCQAAagAAAAIJAQAAAANhYnMAAAABCQAEsQAAAAEFAAAABHNlZWQFAAAAA21heAAAAAUAAAABaQEAAAAUdGVzdEN1cnJlbnRUaW1lc3RhbXAAAAAACQAAAgAAAAEJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAAaQAAAABBQAAAAZoZWlnaHQCAAAAAl9fCQABpAAAAAEIBQAAAAlsYXN0QmxvY2sAAAAJdGltZXN0YW1wAgAAAAJfXwkAAaQAAAABCAUAAAAJbGFzdEJsb2NrAAAABmhlaWdodAAAAAFpAQAAAAlzcGxpdFRlc3QAAAADAAAABGxpc3QAAAAGb2xkU3RyAAAABm5ld1N0cgQAAAAHbmV3TGlzdAkABL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QAAAACCQAAygAAAAIFAAAABHNlZWQAAAAAAAAAAAoFAAAAA251bQkAAAIAAAABBQAAAAZyYW5kMTAAAAAA9H2mWg==", "height": 2592068, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 93wXc4He3agFx8wuSwjPPG4i5ywJ4gAc9GAex5WySXbN Next: jhkj2MiGEpMXP8tzPx9cW2iHBbFYTBQNv4HUjWgNH7g Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let SEP = "__"
5+
46 func abs (v) = if ((0 > v))
57 then (-1 * v)
68 else v
2527 @Callable(i)
2628 func removeTest (listStr,removeStr) = {
2729 let data = split(listStr, removeStr)
28- throw(toString(size(data)))
30+ throw(makeString((split(data[0], SEP) ++ split(data[1], SEP)), SEP))
31+ }
32+
33+
34+
35+@Callable(i)
36+func removeTestV2 (listStr,removeStr) = {
37+ let listData = split(listStr, SEP)
38+ let idx = value(indexOf(listData, removeStr))
39+ throw(makeString(removeByIndex(listData, idx), SEP))
2940 }
3041
3142
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let SEP = "__"
5+
46 func abs (v) = if ((0 > v))
57 then (-1 * v)
68 else v
79
810
911 func rand (seed,max) = toString((abs(toInt(seed)) % max))
1012
1113
1214 @Callable(i)
1315 func testCurrentTimestamp () = throw(((((toString(height) + "__") + toString(lastBlock.timestamp)) + "__") + toString(lastBlock.height)))
1416
1517
1618
1719 @Callable(i)
1820 func splitTest (list,oldStr,newStr) = {
1921 let newList = makeString(split(list, oldStr), newStr)
2022 throw(newList)
2123 }
2224
2325
2426
2527 @Callable(i)
2628 func removeTest (listStr,removeStr) = {
2729 let data = split(listStr, removeStr)
28- throw(toString(size(data)))
30+ throw(makeString((split(data[0], SEP) ++ split(data[1], SEP)), SEP))
31+ }
32+
33+
34+
35+@Callable(i)
36+func removeTestV2 (listStr,removeStr) = {
37+ let listData = split(listStr, SEP)
38+ let idx = value(indexOf(listData, removeStr))
39+ throw(makeString(removeByIndex(listData, idx), SEP))
2940 }
3041
3142
3243
3344 @Callable(i)
3445 func randTest (blockNum,num) = {
3546 let blockInfo = valueOrErrorMessage(blockInfoByHeight(blockNum), "vrf is not supported by block")
3647 let vrf = valueOrErrorMessage(blockInfo.vrf, "vrf is empty")
3748 let seed = sha256(vrf)
3849 let rand0 = rand(seed, num)
3950 let rand1 = ((rand0 + "__") + rand(drop(seed, 1), num))
4051 let rand2 = ((rand1 + "__") + rand(drop(seed, 2), num))
4152 let rand3 = ((rand2 + "__") + rand(drop(seed, 3), num))
4253 let rand4 = ((rand3 + "__") + rand(drop(seed, 4), num))
4354 let rand5 = ((rand4 + "__") + rand(drop(seed, 5), num))
4455 let rand6 = ((rand5 + "__") + rand(drop(seed, 6), num))
4556 let rand7 = ((rand6 + "__") + rand(drop(seed, 7), num))
4657 let rand8 = ((rand7 + "__") + rand(drop(seed, 8), num))
4758 let rand9 = ((rand8 + "__") + rand(drop(seed, 9), num))
4859 let rand10 = ((rand9 + "__") + rand(drop(seed, 10), num))
4960 throw(rand10)
5061 }
5162
5263

github/deemru/w8io/026f985 
41.05 ms