tx · 6V8Pd3AwFcYnxwALZywD5QnoQuu6QLJPDemrrq45ixRX

3Mwb8GE6NHaDxJTby35u2sNAEmDQMWYupCn:  -0.01000000 Waves

2023.06.11 18:02 [2618164] smart account 3Mwb8GE6NHaDxJTby35u2sNAEmDQMWYupCn > SELF 0.00000000 Waves

{ "type": 13, "id": "6V8Pd3AwFcYnxwALZywD5QnoQuu6QLJPDemrrq45ixRX", "fee": 1000000, "feeAssetId": null, "timestamp": 1686495782063, "version": 2, "chainId": 84, "sender": "3Mwb8GE6NHaDxJTby35u2sNAEmDQMWYupCn", "senderPublicKey": "6oJuynzr7rKRYRDWhDrENciDLidQuVGfe82pK7hr5nev", "proofs": [ "2WFtb34DhdwsHJ6W69R8W6wFHvsZySbPxD2oXZZxA4BbuoJ3F2yqqfxtZQ36dGLznuEJqYVxhwbFiBZMPreEru2i" ], "script": "base64:BgIJCAISABIDCgEBBAALcmFuZG9tRGVsYXkAAgEJa2V5Q29tbWl0AQdhZGRyZXNzCQCsAgICE2ZpbmlzaEJsb2NrRm9yQWRkcl8FB2FkZHJlc3MBD2dldFJhbmRvbU51bWJlcgIIbWF4VmFsdWUMZmluaXNoSGVpZ2h0BA9yYW5kb21TZWVkQmxvY2sJAQV2YWx1ZQEJAO0HAQUMZmluaXNoSGVpZ2h0BApyYW5kb21IYXNoCQD3AwEJAQV2YWx1ZQEIBQ9yYW5kb21TZWVkQmxvY2sDdnJmCQBqAgkAsgkCBQpyYW5kb21IYXNoABAFCG1heFZhbHVlAQZwc2V1ZG8BAW4ECnJhbmRvbUhhc2gJAPcDAQkAywECCQEFdmFsdWUBCAkBBXZhbHVlAQkA7QcBBQZoZWlnaHQDdnJmCQCaAwEFAW4EB2hhc2hJbnQJALIJAgUKcmFuZG9tSGFzaAAYCQBqAgUHaGFzaEludAAlAgFpAQZjb21taXQABAtmaW5pc2hCbG9jawkAZAIFBmhlaWdodAULcmFuZG9tRGVsYXkJAJQKAgkAzAgCCQEMSW50ZWdlckVudHJ5AgkBCWtleUNvbW1pdAEJAKUIAQgFAWkGY2FsbGVyBQtmaW5pc2hCbG9jawUDbmlsBQtmaW5pc2hCbG9jawFpAQZyZXZlYWwBCG1heFZhbHVlBAdjb21tS2V5CQEJa2V5Q29tbWl0AQkApQgBCAUBaQZjYWxsZXIEC2ZpbmlzaEJsb2NrCQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJ8IAQUHY29tbUtleQIbWW91IGhhdmUgdG8gY29tbWl0KCkgZmlyc3QhAwkAZgIFC2ZpbmlzaEJsb2NrBQZoZWlnaHQJAAIBAh5SYW5kb20gbnVtYmVyIGlzIG5vdCByZWFkeSB5ZXQEBHJhbmQJAQ9nZXRSYW5kb21OdW1iZXICBQhtYXhWYWx1ZQULZmluaXNoQmxvY2sJAJQKAgkAzAgCCQELRGVsZXRlRW50cnkBBQdjb21tS2V5BQNuaWwFBHJhbmQA0Sf8CA==", "height": 2618164, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2g1LSyZQYnkTk1SpMxLGcv9GwGBdPFMShqphRtf9KVzi Next: TcKU55zrnPBc5WgtxP5CTqSh3NvA4GVc3ijvT8NF7XU Diff:
OldNewDifferences
1616 func i (j) = {
1717 let h = sha256((value(value(blockInfoByHeight(height)).vrf) + toBytes(j)))
1818 let k = toInt(h, 24)
19- $Tuple2(k, (k % 37))
19+ (k % 37)
2020 }
2121
2222
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 2
55
66 func b (c) = ("finishBlockForAddr_" + c)
77
88
99 func d (e,f) = {
1010 let g = value(blockInfoByHeight(f))
1111 let h = sha256(value(g.vrf))
1212 (toInt(h, 16) % e)
1313 }
1414
1515
1616 func i (j) = {
1717 let h = sha256((value(value(blockInfoByHeight(height)).vrf) + toBytes(j)))
1818 let k = toInt(h, 24)
19- $Tuple2(k, (k % 37))
19+ (k % 37)
2020 }
2121
2222
2323 @Callable(l)
2424 func commit () = {
2525 let m = (height + a)
2626 $Tuple2([IntegerEntry(b(toString(l.caller)), m)], m)
2727 }
2828
2929
3030
3131 @Callable(l)
3232 func reveal (e) = {
3333 let n = b(toString(l.caller))
3434 let m = valueOrErrorMessage(getInteger(n), "You have to commit() first!")
3535 if ((m > height))
3636 then throw("Random number is not ready yet")
3737 else {
3838 let o = d(e, m)
3939 $Tuple2([DeleteEntry(n)], o)
4040 }
4141 }
4242
4343

github/deemru/w8io/026f985 
30.30 ms