tx · 95BMFVXcZb3kZdYkULqydLoqLnwQGZYx1TqXWrreWBm8 3N8GKGgDPGGUaAhPMNtsxTJWafHDRnwL7GQ: -0.01000000 Waves 2023.05.31 01:35 [2601313] smart account 3N8GKGgDPGGUaAhPMNtsxTJWafHDRnwL7GQ > SELF 0.00000000 Waves
{ "type": 13, "id": "95BMFVXcZb3kZdYkULqydLoqLnwQGZYx1TqXWrreWBm8", "fee": 1000000, "feeAssetId": null, "timestamp": 1685486154942, "version": 2, "chainId": 84, "sender": "3N8GKGgDPGGUaAhPMNtsxTJWafHDRnwL7GQ", "senderPublicKey": "y5twTW93XMmi75S5bati2cok9QLLFivsrwJedxJeUkX", "proofs": [ "2Pz2FrVV2Li3rKcmScB3LrFnyyhkUzTRezvCTqspVgykp5jWthfmH1wrPijKbshmXkhtK5uuZppq4dW66Y7j6LqQ" ], "script": "base64:BgIHCAISAwoBCAEBBnJhbmRvbQMBaQNtaW4DbWF4BAVvZnNldAkBDXBhcnNlSW50VmFsdWUBCQCyAgIJAKQDAQkAsQkBCAUBaQ10cmFuc2FjdGlvbklkAAEED3JhbmRvbVNlZWRCbG9jawkBBXZhbHVlAQkA7QcBCQBlAgUGaGVpZ2h0BQVvZnNldAQKcmFuZG9tSGFzaAkA1BYBCQEFdmFsdWUBCAUPcmFuZG9tU2VlZEJsb2NrA3ZyZgQIbGFzdENoYXIJALICAgkApAMBCQCxCQEFCnJhbmRvbUhhc2gABQkAZAIJAGoCCQENcGFyc2VJbnRWYWx1ZQEFCGxhc3RDaGFyCQBkAgkAZQIFA21heAUDbWluAAEFA21pbgEBaQEFdGVzdDcBAXgEB2FkZHJlc3MJANgEAQgIBQFpBmNhbGxlcgVieXRlcwQCcjMJAQZyYW5kb20DBQFpAAEADAkAlAoCCQDMCAIJAQxJbnRlZ2VyRW50cnkCAgZyYW5kb20FAnIzBQNuaWwAAQC52jTG", "height": 2601313, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9WRNgwZzkKoMeUf3HUoV1xn6JuNbiKdscPx7vrb7q1So Next: AyLNT8tDb6FFttxqDXyP9vX1pbP8YeZzvPnE4Exr8BGE Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | func a () = { | |
5 | - | let | |
6 | - | let | |
7 | - | let | |
8 | - | let | |
9 | - | | |
4 | + | func a (b,c,d) = { | |
5 | + | let e = parseIntValue(takeRight(toString(toInt(b.transactionId)), 1)) | |
6 | + | let f = value(blockInfoByHeight((height - e))) | |
7 | + | let g = sha256_16Kb(value(f.vrf)) | |
8 | + | let h = takeRight(toString(toInt(g)), 5) | |
9 | + | ((parseIntValue(h) % ((d - c) + 1)) + c) | |
10 | 10 | } | |
11 | 11 | ||
12 | 12 | ||
13 | - | func f () = { | |
14 | - | let b = value(blockInfoByHeight((height - 1))) | |
15 | - | let c = sha256_16Kb(value(b.vrf)) | |
16 | - | takeRight(toString(toInt(c)), 1) | |
17 | - | } | |
18 | - | ||
19 | - | ||
20 | - | func g (h) = { | |
21 | - | let b = value(blockInfoByHeight((height - 1))) | |
22 | - | let c = sha256_16Kb(value(b.vrf)) | |
23 | - | let e = takeRight(toString(toInt(c)), 1) | |
24 | - | let i = takeRight(toString(toInt(h.transactionId)), 1) | |
25 | - | (e + i) | |
26 | - | } | |
27 | - | ||
28 | - | ||
29 | - | func j (h,k,l) = { | |
30 | - | let m = parseIntValue(takeRight(toString(toInt(h.transactionId)), 1)) | |
31 | - | let b = value(blockInfoByHeight((height - m))) | |
32 | - | let c = sha256_16Kb(value(b.vrf)) | |
33 | - | let e = takeRight(toString(toInt(c)), 5) | |
34 | - | let n = ((parseIntValue(e) % ((l - k) + 1)) + k) | |
35 | - | n | |
36 | - | } | |
37 | - | ||
38 | - | ||
39 | - | func o (h) = { | |
40 | - | let b = value(blockInfoByHeight((height - 1))) | |
41 | - | let c = sha256_16Kb(value(b.vrf)) | |
42 | - | toString(toInt(c)) | |
43 | - | } | |
44 | - | ||
45 | - | ||
46 | - | @Callable(h) | |
47 | - | func test7 () = { | |
48 | - | let p = toBase58String(h.caller.bytes) | |
49 | - | let q = j(h, 1, 12) | |
50 | - | $Tuple2([IntegerEntry("random", q)], 1) | |
13 | + | @Callable(b) | |
14 | + | func test7 (i) = { | |
15 | + | let j = toBase58String(b.caller.bytes) | |
16 | + | let k = a(b, 1, 12) | |
17 | + | $Tuple2([IntegerEntry("random", k)], 1) | |
51 | 18 | } | |
52 | 19 | ||
53 | 20 |
github/deemru/w8io/169f3d6 31.73 ms ◑