tx · D7L5Lc9f3nkf3F3rGFp9LUnDmFxfiPnHfCPub7aJtmQE

3Mynaio8coZLr58tu2AdBEhmCvB17vTBRkA:  -0.01000000 Waves

2023.05.31 13:34 [2602026] smart account 3Mynaio8coZLr58tu2AdBEhmCvB17vTBRkA > SELF 0.00000000 Waves

{ "type": 13, "id": "D7L5Lc9f3nkf3F3rGFp9LUnDmFxfiPnHfCPub7aJtmQE", "fee": 1000000, "feeAssetId": null, "timestamp": 1685529331648, "version": 2, "chainId": 84, "sender": "3Mynaio8coZLr58tu2AdBEhmCvB17vTBRkA", "senderPublicKey": "Dx7cJVhpJb4qUDGiDnSjj6Wfjdj5nmzwVLfaggkbjDtv", "proofs": [ "2N3zRjqHcuDiWc622P8tMEopg8ZoeKV8pYBnc988T1yGtc8HcciDLL2xm23aBsHPZGRtu5y3Y5UbseVMViH7NjdK" ], "script": "base64:AAIFAAAAAAAAAAwIAhIDCgEBEgMKAQgAAAABAAAAAAFOAAAAAAAAAAABAAAAAgAAAAFpAQAAAAZjb21taXQAAAABAAAAA2JldAMDCQAAZgAAAAIAAAAAAAAAAAAFAAAAA2JldAYJAABmAAAAAgUAAAADYmV0AAAAAAAAAAD/CQAAAgAAAAECAAAADzAgPD0gYmV0IDw9IDI1NQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAAlgAAAABCAUAAAABaQAAAA10cmFuc2FjdGlvbklkBQAAAANiZXQFAAAAA25pbAAAAAFpAQAAAAZyZXZlYWwAAAABAAAAAmlkAwkAAGYAAAACAAAAAAAAAAABBQAAAAFOCQAAAgAAAAECAAAAD04gY2Fubm90IGJlIDwgMQQAAAAMY29tbWl0SGVpZ2h0CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAPpAAAAAQkAAlkAAAABBQAAAAJpZAkAASwAAAACBQAAAAJpZAIAAAAKIG5vdCBmb3VuZAQAAAAMcmV2ZWFsSGVpZ2h0CQAAZAAAAAIFAAAADGNvbW1pdEhlaWdodAUAAAABTgMJAABmAAAAAgUAAAAMcmV2ZWFsSGVpZ2h0BQAAAAZoZWlnaHQJAAACAAAAAQkAASwAAAACCQABLAAAAAICAAAABXdhaXQgCQABpAAAAAEJAABlAAAAAgUAAAAMcmV2ZWFsSGVpZ2h0BQAAAAZoZWlnaHQCAAAAGSBibG9ja3MgdG8gcmV2ZWFsIHRoaXMgaWQEAAAAC3JldmVhbEJsb2NrCQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAPtAAAAAQUAAAAMcmV2ZWFsSGVpZ2h0AgAAABF1bmV4Y3BlY3RlZCBlcnJvcgQAAAADdnJmCQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIIBQAAAAtyZXZlYWxCbG9jawAAAAN2cmYCAAAAEXVuZXhjcGVjdGVkIGVycm9yBAAAAANiZXQJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABB8AAAABBQAAAAJpZAIAAAAPY2Fubm90IGZpbmQgYmV0BAAAAAZyZXZlYWwJAAH3AAAAAQkAAMsAAAACCQAAywAAAAIFAAAAA3ZyZgkAAZsAAAABBQAAAAJpZAkAAZoAAAABBQAAAANiZXQEAAAABGdvYWwJAABqAAAAAgkABLEAAAABBQAAAAZyZXZlYWwAAAAAAAAAAQAEAAAAA3dpbgkAAAAAAAACBQAAAANiZXQFAAAABGdvYWwJAAUUAAAAAgkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAAJpZAUAAAADbmlsBQAAAAN3aW4AAAAABXMMqg==", "height": 2602026, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3ByfB3U8B62d2JmeFixfXHdZA2SZpm4ANPunVgWw4kz1 Next: Bbf3BU8TcGYU3Ap61GFcKyt3PuFetCunhNCpeij5NDW4 Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let N = 10
4+let N = 1
55
66 @Callable(i)
77 func commit (bet) = if (if ((0 > bet))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let N = 10
4+let N = 1
55
66 @Callable(i)
77 func commit (bet) = if (if ((0 > bet))
88 then true
99 else (bet > 255))
1010 then throw("0 <= bet <= 255")
1111 else [IntegerEntry(toBase58String(i.transactionId), bet)]
1212
1313
1414
1515 @Callable(i)
1616 func reveal (id) = if ((1 > N))
1717 then throw("N cannot be < 1")
1818 else {
1919 let commitHeight = valueOrErrorMessage(transactionHeightById(fromBase58String(id)), (id + " not found"))
2020 let revealHeight = (commitHeight + N)
2121 if ((revealHeight > height))
2222 then throw((("wait " + toString((revealHeight - height))) + " blocks to reveal this id"))
2323 else {
2424 let revealBlock = valueOrErrorMessage(blockInfoByHeight(revealHeight), "unexcpected error")
2525 let vrf = valueOrErrorMessage(revealBlock.vrf, "unexcpected error")
2626 let bet = valueOrErrorMessage(getInteger(id), "cannot find bet")
2727 let reveal = sha256(((vrf + toBytes(id)) + toBytes(bet)))
2828 let goal = (toInt(reveal) % 256)
2929 let win = (bet == goal)
3030 $Tuple2([DeleteEntry(id)], win)
3131 }
3232 }
3333
3434

github/deemru/w8io/169f3d6 
31.24 ms