tx · 9iyUtxZsqFLEJr6q4MR3taxD2AFnxMCYPXssR3FuvZC5

3N8GKGgDPGGUaAhPMNtsxTJWafHDRnwL7GQ:  -0.01000000 Waves

2023.05.31 00:35 [2601258] smart account 3N8GKGgDPGGUaAhPMNtsxTJWafHDRnwL7GQ > SELF 0.00000000 Waves

{ "type": 13, "id": "9iyUtxZsqFLEJr6q4MR3taxD2AFnxMCYPXssR3FuvZC5", "fee": 1000000, "feeAssetId": null, "timestamp": 1685482550335, "version": 2, "chainId": 84, "sender": "3N8GKGgDPGGUaAhPMNtsxTJWafHDRnwL7GQ", "senderPublicKey": "y5twTW93XMmi75S5bati2cok9QLLFivsrwJedxJeUkX", "proofs": [ "yDg6H9NzT2Qc956iHD7n1Chg9wBZLxa3kyWUpXkEAHNVNxPvBCr9V6rWSyPLteozqJgi22NjPVodqLTrKMf3ttQ" ], "script": "base64:BgIECAISAAIBD2dldFJhbmRvbU51bWJlcgAED3JhbmRvbVNlZWRCbG9jawkBBXZhbHVlAQkA7QcBCQBlAgUGaGVpZ2h0AAEECnJhbmRvbUhhc2gJANQWAQkBBXZhbHVlAQgFD3JhbmRvbVNlZWRCbG9jawN2cmYEA3N0cgkA2AQBBQpyYW5kb21IYXNoBAhsYXN0Q2hhcgkAsgICBQNzdHIAAgUIbGFzdENoYXIBEGdldFJhbmRvbU51bWJlcjIABA9yYW5kb21TZWVkQmxvY2sJAQV2YWx1ZQEJAO0HAQkAZQIFBmhlaWdodAABBApyYW5kb21IYXNoCQDUFgEJAQV2YWx1ZQEIBQ9yYW5kb21TZWVkQmxvY2sDdnJmCQCyAgIJAKQDAQkAsQkBBQpyYW5kb21IYXNoAAEBAWkBBXRlc3Q3AAQHYWRkcmVzcwkA2AQBCAgFAWkGY2FsbGVyBWJ5dGVzBAFyCQEPZ2V0UmFuZG9tTnVtYmVyAAQCcjIJARBnZXRSYW5kb21OdW1iZXIyAAkAlAoCCQDMCAIJAQtTdHJpbmdFbnRyeQICA1hYWAUBcgkAzAgCCQELU3RyaW5nRW50cnkCAgRYWFgyBQJyMgUDbmlsAAEAaR4RYg==", "height": 2601258, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DQLqqkML3tNNptJR8R2P5YpHBCMmi9Bq1C1Dw9KVqX7o Next: CzeQdqxeCqL9fh64rYqXf8kP9uSew4pfnAefF145x52 Diff:
OldNewDifferences
1313 func getRandomNumber2 () = {
1414 let randomSeedBlock = value(blockInfoByHeight((height - 1)))
1515 let randomHash = sha256_16Kb(value(randomSeedBlock.vrf))
16- toString(toInt(randomHash))
16+ takeRight(toString(toInt(randomHash)), 1)
1717 }
1818
1919
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getRandomNumber () = {
55 let randomSeedBlock = value(blockInfoByHeight((height - 1)))
66 let randomHash = sha256_16Kb(value(randomSeedBlock.vrf))
77 let str = toBase58String(randomHash)
88 let lastChar = takeRight(str, 2)
99 lastChar
1010 }
1111
1212
1313 func getRandomNumber2 () = {
1414 let randomSeedBlock = value(blockInfoByHeight((height - 1)))
1515 let randomHash = sha256_16Kb(value(randomSeedBlock.vrf))
16- toString(toInt(randomHash))
16+ takeRight(toString(toInt(randomHash)), 1)
1717 }
1818
1919
2020 @Callable(i)
2121 func test7 () = {
2222 let address = toBase58String(i.caller.bytes)
2323 let r = getRandomNumber()
2424 let r2 = getRandomNumber2()
2525 $Tuple2([StringEntry("XXX", r), StringEntry("XXX2", r2)], 1)
2626 }
2727
2828

github/deemru/w8io/026f985 
25.93 ms