tx · 3ByfB3U8B62d2JmeFixfXHdZA2SZpm4ANPunVgWw4kz1 3Mynaio8coZLr58tu2AdBEhmCvB17vTBRkA: -0.01000000 Waves 2023.05.31 13:29 [2602022] smart account 3Mynaio8coZLr58tu2AdBEhmCvB17vTBRkA > SELF 0.00000000 Waves
{ "type": 13, "id": "3ByfB3U8B62d2JmeFixfXHdZA2SZpm4ANPunVgWw4kz1", "fee": 1000000, "feeAssetId": null, "timestamp": 1685529060070, "version": 2, "chainId": 84, "sender": "3Mynaio8coZLr58tu2AdBEhmCvB17vTBRkA", "senderPublicKey": "Dx7cJVhpJb4qUDGiDnSjj6Wfjdj5nmzwVLfaggkbjDtv", "proofs": [ "3jYRTGaRwn7cwHnmUAu2UoHnDnVg79eMydyJF7pffP8P9zDHtyBALRVjEAGGueKsZfaCSi1seRbipMVjwN3uEE2x" ], "script": "base64:AAIFAAAAAAAAAAwIAhIDCgEBEgMKAQgAAAABAAAAAAFOAAAAAAAAAAAKAAAAAgAAAAFpAQAAAAZjb21taXQAAAABAAAAA2JldAMDCQAAZgAAAAIAAAAAAAAAAAAFAAAAA2JldAYJAABmAAAAAgUAAAADYmV0AAAAAAAAAAD/CQAAAgAAAAECAAAADzAgPD0gYmV0IDw9IDI1NQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAAlgAAAABCAUAAAABaQAAAA10cmFuc2FjdGlvbklkBQAAAANiZXQFAAAAA25pbAAAAAFpAQAAAAZyZXZlYWwAAAABAAAAAmlkAwkAAGYAAAACAAAAAAAAAAABBQAAAAFOCQAAAgAAAAECAAAAD04gY2Fubm90IGJlIDwgMQQAAAAMY29tbWl0SGVpZ2h0CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAPpAAAAAQkAAlkAAAABBQAAAAJpZAkAASwAAAACBQAAAAJpZAIAAAAKIG5vdCBmb3VuZAQAAAAMcmV2ZWFsSGVpZ2h0CQAAZAAAAAIFAAAADGNvbW1pdEhlaWdodAUAAAABTgMJAABmAAAAAgUAAAAMcmV2ZWFsSGVpZ2h0BQAAAAZoZWlnaHQJAAACAAAAAQkAASwAAAACCQABLAAAAAICAAAABXdhaXQgCQABpAAAAAEJAABlAAAAAgUAAAAMcmV2ZWFsSGVpZ2h0BQAAAAZoZWlnaHQCAAAAGSBibG9ja3MgdG8gcmV2ZWFsIHRoaXMgaWQEAAAAC3JldmVhbEJsb2NrCQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAPtAAAAAQUAAAAMcmV2ZWFsSGVpZ2h0AgAAABF1bmV4Y3BlY3RlZCBlcnJvcgQAAAADdnJmCQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIIBQAAAAtyZXZlYWxCbG9jawAAAAN2cmYCAAAAEXVuZXhjcGVjdGVkIGVycm9yBAAAAANiZXQJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABB8AAAABBQAAAAJpZAIAAAAPY2Fubm90IGZpbmQgYmV0BAAAAAZyZXZlYWwJAAH3AAAAAQkAAMsAAAACCQAAywAAAAIFAAAAA3ZyZgkAAZsAAAABBQAAAAJpZAkAAZoAAAABBQAAAANiZXQEAAAABGdvYWwJAABqAAAAAgkABLEAAAABBQAAAAZyZXZlYWwAAAAAAAAAAQAEAAAAA3dpbgkAAAAAAAACBQAAAANiZXQFAAAABGdvYWwJAAUUAAAAAgkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAAJpZAUAAAADbmlsBQAAAAN3aW4AAAAAABfmbg==", "height": 2602022, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: D7L5Lc9f3nkf3F3rGFp9LUnDmFxfiPnHfCPub7aJtmQE Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = 10 | |
5 | + | ||
6 | + | @Callable(b) | |
7 | + | func commit (c) = if (if ((0 > c)) | |
8 | + | then true | |
9 | + | else (c > 255)) | |
10 | + | then throw("0 <= bet <= 255") | |
11 | + | else [IntegerEntry(toBase58String(b.transactionId), c)] | |
12 | + | ||
13 | + | ||
14 | + | ||
15 | + | @Callable(b) | |
16 | + | func reveal (d) = if ((1 > a)) | |
17 | + | then throw("N cannot be < 1") | |
18 | + | else { | |
19 | + | let e = valueOrErrorMessage(transactionHeightById(fromBase58String(d)), (d + " not found")) | |
20 | + | let f = (e + a) | |
21 | + | if ((f > height)) | |
22 | + | then throw((("wait " + toString((f - height))) + " blocks to reveal this id")) | |
23 | + | else { | |
24 | + | let g = valueOrErrorMessage(blockInfoByHeight(f), "unexcpected error") | |
25 | + | let h = valueOrErrorMessage(g.vrf, "unexcpected error") | |
26 | + | let c = valueOrErrorMessage(getInteger(d), "cannot find bet") | |
27 | + | let i = sha256(((h + toBytes(d)) + toBytes(c))) | |
28 | + | let j = (toInt(i) % 256) | |
29 | + | let k = (c == j) | |
30 | + | $Tuple2([DeleteEntry(d)], k) | |
31 | + | } | |
32 | + | } | |
33 | + | ||
34 | + |
github/deemru/w8io/169f3d6 19.53 ms ◑