tx · JCpVgFrsDothsNN84SPooT45T6PyEmNAK5fsgpwRYycd
3N8GKGgDPGGUaAhPMNtsxTJWafHDRnwL7GQ: -0.01000000 Waves
2023.05.31 00:33 [2601256] smart account 3N8GKGgDPGGUaAhPMNtsxTJWafHDRnwL7GQ > SELF 0.00000000 Waves
{
"type": 13,
"id": "JCpVgFrsDothsNN84SPooT45T6PyEmNAK5fsgpwRYycd",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1685482382420,
"version": 2,
"chainId": 84,
"sender": "3N8GKGgDPGGUaAhPMNtsxTJWafHDRnwL7GQ",
"senderPublicKey": "y5twTW93XMmi75S5bati2cok9QLLFivsrwJedxJeUkX",
"proofs": [
"3d1a6sPo1Pj8HrWNeKFmBRArSYC3dTewsFzv6bCx96C9BWEYCMyHmWDTYQmJWeK47d2uRCaR69v6HrWR8v56Ljor"
],
"script": "base64:BgIECAISAAIBD2dldFJhbmRvbU51bWJlcgAED3JhbmRvbVNlZWRCbG9jawkBBXZhbHVlAQkA7QcBCQBlAgUGaGVpZ2h0AAEECnJhbmRvbUhhc2gJANQWAQkBBXZhbHVlAQgFD3JhbmRvbVNlZWRCbG9jawN2cmYEA3N0cgkA2AQBBQpyYW5kb21IYXNoBAhsYXN0Q2hhcgkAsgICBQNzdHIAAgUIbGFzdENoYXIBEGdldFJhbmRvbU51bWJlcjIABA9yYW5kb21TZWVkQmxvY2sJAQV2YWx1ZQEJAO0HAQkAZQIFBmhlaWdodAABBApyYW5kb21IYXNoCQDUFgEJAQV2YWx1ZQEIBQ9yYW5kb21TZWVkQmxvY2sDdnJmCQDYBAEFCnJhbmRvbUhhc2gBAWkBBXRlc3Q3AAQHYWRkcmVzcwkA2AQBCAgFAWkGY2FsbGVyBWJ5dGVzBAFyCQEPZ2V0UmFuZG9tTnVtYmVyAAQCcjIJARBnZXRSYW5kb21OdW1iZXIyAAkAlAoCCQDMCAIJAQtTdHJpbmdFbnRyeQICA1hYWAUBcgkAzAgCCQELU3RyaW5nRW50cnkCAgRYWFgyBQJyMgUDbmlsAAEAaTRBgg==",
"height": 2601256,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 6ejCSNxjA7JsdGmJGyypLYpHq8EdBn3ucdmPBfsiApFe
Next: DQLqqkML3tNNptJR8R2P5YpHBCMmi9Bq1C1Dw9KVqX7o
Diff:
Old | New | | Differences |
---|
10 | 10 | | } |
---|
11 | 11 | | |
---|
12 | 12 | | |
---|
| 13 | + | func getRandomNumber2 () = { |
---|
| 14 | + | let randomSeedBlock = value(blockInfoByHeight((height - 1))) |
---|
| 15 | + | let randomHash = sha256_16Kb(value(randomSeedBlock.vrf)) |
---|
| 16 | + | toBase58String(randomHash) |
---|
| 17 | + | } |
---|
| 18 | + | |
---|
| 19 | + | |
---|
13 | 20 | | @Callable(i) |
---|
14 | 21 | | func test7 () = { |
---|
15 | 22 | | let address = toBase58String(i.caller.bytes) |
---|
16 | 23 | | let r = getRandomNumber() |
---|
17 | | - | $Tuple2([StringEntry("XXX", r)], 1) |
---|
| 24 | + | let r2 = getRandomNumber2() |
---|
| 25 | + | $Tuple2([StringEntry("XXX", r), StringEntry("XXX2", r2)], 1) |
---|
18 | 26 | | } |
---|
19 | 27 | | |
---|
20 | 28 | | |
---|
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 | + | func getRandomNumber2 () = { |
---|
| 14 | + | let randomSeedBlock = value(blockInfoByHeight((height - 1))) |
---|
| 15 | + | let randomHash = sha256_16Kb(value(randomSeedBlock.vrf)) |
---|
| 16 | + | toBase58String(randomHash) |
---|
| 17 | + | } |
---|
| 18 | + | |
---|
| 19 | + | |
---|
13 | 20 | | @Callable(i) |
---|
14 | 21 | | func test7 () = { |
---|
15 | 22 | | let address = toBase58String(i.caller.bytes) |
---|
16 | 23 | | let r = getRandomNumber() |
---|
17 | | - | $Tuple2([StringEntry("XXX", r)], 1) |
---|
| 24 | + | let r2 = getRandomNumber2() |
---|
| 25 | + | $Tuple2([StringEntry("XXX", r), StringEntry("XXX2", r2)], 1) |
---|
18 | 26 | | } |
---|
19 | 27 | | |
---|
20 | 28 | | |
---|