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//////////BQAAAAF2BQAAAAF2AQAAAARyYW5kAAAAAgAAAARzZWVkAAAAA21heAkAAaQAAAABCQAAagAAAAIJAQAAAANhYnMAAAABCQAEsQAAAAEFAAAABHNlZWQFAAAAA21heAAAAAUAAAABaQEAAAAUdGVzdEN1cnJlbnRUaW1lc3RhbXAAAAAACQAAAgAAAAEJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAAaQAAAABBQAAAAZoZWlnaHQCAAAAAl9fCQABpAAAAAEIBQAAAAlsYXN0QmxvY2sAAAAJdGltZXN0YW1wAgAAAAJfXwkAAaQAAAABCAUAAAAJbGFzdEJsb2NrAAAABmhlaWdodAAAAAFpAQAAAAlzcGxpdFRlc3QAAAADAAAABGxpc3QAAAAGb2xkU3RyAAAABm5ld1N0cgQAAAAHbmV3TGlzdAkABLk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AAAACCQAAygAAAAIFAAAABHNlZWQAAAAAAAAAAAoFAAAAA251bQkAAAIAAAABBQAAAAZyYW5kMTAAAAAA9H2mWg==", "height": 2592068, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 93wXc4He3agFx8wuSwjPPG4i5ywJ4gAc9GAex5WySXbN Next: jhkj2MiGEpMXP8tzPx9cW2iHBbFYTBQNv4HUjWgNH7g Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let SEP = "__" | |
5 | + | ||
4 | 6 | func abs (v) = if ((0 > v)) | |
5 | 7 | then (-1 * v) | |
6 | 8 | else v | |
25 | 27 | @Callable(i) | |
26 | 28 | func removeTest (listStr,removeStr) = { | |
27 | 29 | 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)) | |
29 | 40 | } | |
30 | 41 | ||
31 | 42 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let SEP = "__" | |
5 | + | ||
4 | 6 | func abs (v) = if ((0 > v)) | |
5 | 7 | then (-1 * v) | |
6 | 8 | else v | |
7 | 9 | ||
8 | 10 | ||
9 | 11 | func rand (seed,max) = toString((abs(toInt(seed)) % max)) | |
10 | 12 | ||
11 | 13 | ||
12 | 14 | @Callable(i) | |
13 | 15 | func testCurrentTimestamp () = throw(((((toString(height) + "__") + toString(lastBlock.timestamp)) + "__") + toString(lastBlock.height))) | |
14 | 16 | ||
15 | 17 | ||
16 | 18 | ||
17 | 19 | @Callable(i) | |
18 | 20 | func splitTest (list,oldStr,newStr) = { | |
19 | 21 | let newList = makeString(split(list, oldStr), newStr) | |
20 | 22 | throw(newList) | |
21 | 23 | } | |
22 | 24 | ||
23 | 25 | ||
24 | 26 | ||
25 | 27 | @Callable(i) | |
26 | 28 | func removeTest (listStr,removeStr) = { | |
27 | 29 | 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)) | |
29 | 40 | } | |
30 | 41 | ||
31 | 42 | ||
32 | 43 | ||
33 | 44 | @Callable(i) | |
34 | 45 | func randTest (blockNum,num) = { | |
35 | 46 | let blockInfo = valueOrErrorMessage(blockInfoByHeight(blockNum), "vrf is not supported by block") | |
36 | 47 | let vrf = valueOrErrorMessage(blockInfo.vrf, "vrf is empty") | |
37 | 48 | let seed = sha256(vrf) | |
38 | 49 | let rand0 = rand(seed, num) | |
39 | 50 | let rand1 = ((rand0 + "__") + rand(drop(seed, 1), num)) | |
40 | 51 | let rand2 = ((rand1 + "__") + rand(drop(seed, 2), num)) | |
41 | 52 | let rand3 = ((rand2 + "__") + rand(drop(seed, 3), num)) | |
42 | 53 | let rand4 = ((rand3 + "__") + rand(drop(seed, 4), num)) | |
43 | 54 | let rand5 = ((rand4 + "__") + rand(drop(seed, 5), num)) | |
44 | 55 | let rand6 = ((rand5 + "__") + rand(drop(seed, 6), num)) | |
45 | 56 | let rand7 = ((rand6 + "__") + rand(drop(seed, 7), num)) | |
46 | 57 | let rand8 = ((rand7 + "__") + rand(drop(seed, 8), num)) | |
47 | 58 | let rand9 = ((rand8 + "__") + rand(drop(seed, 9), num)) | |
48 | 59 | let rand10 = ((rand9 + "__") + rand(drop(seed, 10), num)) | |
49 | 60 | throw(rand10) | |
50 | 61 | } | |
51 | 62 | ||
52 | 63 |
github/deemru/w8io/026f985 41.05 ms ◑