tx · DQLqqkML3tNNptJR8R2P5YpHBCMmi9Bq1C1Dw9KVqX7o
3N8GKGgDPGGUaAhPMNtsxTJWafHDRnwL7GQ: -0.01000000 Waves
2023.05.31 00:33 [2601256] smart account 3N8GKGgDPGGUaAhPMNtsxTJWafHDRnwL7GQ > SELF 0.00000000 Waves
{
"type": 13,
"id": "DQLqqkML3tNNptJR8R2P5YpHBCMmi9Bq1C1Dw9KVqX7o",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1685482472005,
"version": 2,
"chainId": 84,
"sender": "3N8GKGgDPGGUaAhPMNtsxTJWafHDRnwL7GQ",
"senderPublicKey": "y5twTW93XMmi75S5bati2cok9QLLFivsrwJedxJeUkX",
"proofs": [
"4CS1HELeG5PKF2Yrt8EDYpJ37ZEwYAimWAMZYkBXwWNqZvQVgckufU26sZer3NTEMywokxEJKBj9z1NpUFyvkPkq"
],
"script": "base64:BgIECAISAAIBD2dldFJhbmRvbU51bWJlcgAED3JhbmRvbVNlZWRCbG9jawkBBXZhbHVlAQkA7QcBCQBlAgUGaGVpZ2h0AAEECnJhbmRvbUhhc2gJANQWAQkBBXZhbHVlAQgFD3JhbmRvbVNlZWRCbG9jawN2cmYEA3N0cgkA2AQBBQpyYW5kb21IYXNoBAhsYXN0Q2hhcgkAsgICBQNzdHIAAgUIbGFzdENoYXIBEGdldFJhbmRvbU51bWJlcjIABA9yYW5kb21TZWVkQmxvY2sJAQV2YWx1ZQEJAO0HAQkAZQIFBmhlaWdodAABBApyYW5kb21IYXNoCQDUFgEJAQV2YWx1ZQEIBQ9yYW5kb21TZWVkQmxvY2sDdnJmCQCkAwEJALEJAQUKcmFuZG9tSGFzaAEBaQEFdGVzdDcABAdhZGRyZXNzCQDYBAEICAUBaQZjYWxsZXIFYnl0ZXMEAXIJAQ9nZXRSYW5kb21OdW1iZXIABAJyMgkBEGdldFJhbmRvbU51bWJlcjIACQCUCgIJAMwIAgkBC1N0cmluZ0VudHJ5AgIDWFhYBQFyCQDMCAIJAQtTdHJpbmdFbnRyeQICBFhYWDIFAnIyBQNuaWwAAQBR/DD5",
"height": 2601256,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: JCpVgFrsDothsNN84SPooT45T6PyEmNAK5fsgpwRYycd
Next: 9iyUtxZsqFLEJr6q4MR3taxD2AFnxMCYPXssR3FuvZC5
Diff:
Old | New | | Differences |
---|
13 | 13 | | func getRandomNumber2 () = { |
---|
14 | 14 | | let randomSeedBlock = value(blockInfoByHeight((height - 1))) |
---|
15 | 15 | | let randomHash = sha256_16Kb(value(randomSeedBlock.vrf)) |
---|
16 | | - | toBase58String(randomHash) |
---|
| 16 | + | toString(toInt(randomHash)) |
---|
17 | 17 | | } |
---|
18 | 18 | | |
---|
19 | 19 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 6 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | func getRandomNumber () = { |
---|
5 | 5 | | let randomSeedBlock = value(blockInfoByHeight((height - 1))) |
---|
6 | 6 | | let randomHash = sha256_16Kb(value(randomSeedBlock.vrf)) |
---|
7 | 7 | | let str = toBase58String(randomHash) |
---|
8 | 8 | | let lastChar = takeRight(str, 2) |
---|
9 | 9 | | lastChar |
---|
10 | 10 | | } |
---|
11 | 11 | | |
---|
12 | 12 | | |
---|
13 | 13 | | func getRandomNumber2 () = { |
---|
14 | 14 | | let randomSeedBlock = value(blockInfoByHeight((height - 1))) |
---|
15 | 15 | | let randomHash = sha256_16Kb(value(randomSeedBlock.vrf)) |
---|
16 | | - | toBase58String(randomHash) |
---|
| 16 | + | toString(toInt(randomHash)) |
---|
17 | 17 | | } |
---|
18 | 18 | | |
---|
19 | 19 | | |
---|
20 | 20 | | @Callable(i) |
---|
21 | 21 | | func test7 () = { |
---|
22 | 22 | | let address = toBase58String(i.caller.bytes) |
---|
23 | 23 | | let r = getRandomNumber() |
---|
24 | 24 | | let r2 = getRandomNumber2() |
---|
25 | 25 | | $Tuple2([StringEntry("XXX", r), StringEntry("XXX2", r2)], 1) |
---|
26 | 26 | | } |
---|
27 | 27 | | |
---|
28 | 28 | | |
---|