tx · FoJNUch4bHidwq3B1167mNorBoeDK467y96S288aqcmW

3N8vbCi8fbBq4cY8L3AWqQeq7VJR5FxvR7J:  -0.01000000 Waves

2021.09.25 21:27 [1718839] smart account 3N8vbCi8fbBq4cY8L3AWqQeq7VJR5FxvR7J > SELF 0.00000000 Waves

{ "type": 13, "id": "FoJNUch4bHidwq3B1167mNorBoeDK467y96S288aqcmW", "fee": 1000000, "feeAssetId": null, "timestamp": 1632594502034, "version": 2, "chainId": 84, "sender": "3N8vbCi8fbBq4cY8L3AWqQeq7VJR5FxvR7J", "senderPublicKey": "EkHiMGjZnobhmra42ocG6pxLtFnuq8oPJw2cR7hVSTM1", "proofs": [ "3ydwuzAg5JY2bT892Ce78byFQB5FDhDdmr2Vna9tJSGvb3vT7pbJQ3qUoQCZMU82d6hrbPX3WzrJ44D5yQAnqhbB" ], "script": "base64:AAIFAAAAAAAAAKEIAhIAGhAKAmExEgpyYW5kb21pemVyGgkKAmEyEgNpbnYaDgoCYTMSCGxhc3RQbGF5Gg0KAmE0EgckbWF0Y2gwGgcKAmE1EgFzGgoKAmE2EgRyYW5kGg8KAmE3EglwbGF5TGltaXQaDQoCYTgSB3BheW1lbnQaDgoCYTkSCHJhbmRoYXNoGgsKAmIxEgVhc3NldBoNCgJiMhIHYXNzZXRJZAAAAAEBAAAAAmExAAAAAQAAAAJhMgQAAAACYTMEAAAAAmE0CQAEHAAAAAIFAAAABHRoaXMCAAAACGxhc3RQbGF5AwkAAAEAAAACBQAAAAJhNAIAAAAKQnl0ZVZlY3RvcgQAAAACYTUFAAAAAmE0BQAAAAJhNQMJAAABAAAAAgUAAAACYTQCAAAABFVuaXQBAAAADFdhdmVzTG90dG9WMgkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcgQAAAACYTYJAADLAAAAAgkAAMsAAAACCQAAywAAAAIJAADLAAAAAgkAAMsAAAACBQAAAAJhMwgFAAAAAmEyAAAADXRyYW5zYWN0aW9uSWQIBQAAAAJhMgAAAA9jYWxsZXJ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bAkABEwAAAACCQEAAAALQmluYXJ5RW50cnkAAAACAgAAAAhsYXN0UGxheQUAAAACYTkFAAAAA25pbAAAAABstt8z", "height": 1718839, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8jCSC1JHw6BFJkCAbBaVvTRRYDmNCbmw2Dh8SRnWmDcv Next: 8ePMUgEEDzUN3Nyws2mPh1RMkzEADnCXNjJcojfVsaxJ Diff:
OldNewDifferences
3131 then {
3232 let asset = Issue("Unique Asset", "Test NFT", 1, 0, false, unit, height)
3333 let assetId = calculateAssetId(asset)
34-[StringEntry("lastPlay", toBase58String(randhash)), asset, ScriptTransfer(inv.caller, 1, assetId)]
34+[BinaryEntry("lastPlay", randhash), asset, ScriptTransfer(inv.caller, 1, assetId)]
3535 }
36- else [StringEntry("lastPlay", toBase58String(randhash))]
36+ else [BinaryEntry("lastPlay", randhash)]
3737 }
3838 }
3939
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func randomizer (inv) = {
55 let lastPlay = match getBinary(this, "lastPlay") {
66 case s: ByteVector =>
77 s
88 case _: Unit =>
99 base58'2ee4oFDYriWJ9EMeR'
1010 case _ =>
1111 throw("Match error")
1212 }
1313 let rand = (((((lastPlay + inv.transactionId) + inv.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height))
1414 sha256(rand)
1515 }
1616
1717
1818 @Callable(inv)
1919 func lotto () = {
2020 let playLimit = wavesBalance(this).available
2121 let payment = inv.payments[0]
2222 if (!(isDefined(payment)))
2323 then throw("Should be with Payment in Waves")
2424 else if (isDefined(payment.assetId))
2525 then throw("Payment should be in Waves")
2626 else if ((payment.amount > playLimit))
2727 then throw(("Payment should be less than " + toString(playLimit)))
2828 else {
2929 let randhash = randomizer(inv)
3030 if ((500 > (toInt(randhash) % 1000)))
3131 then {
3232 let asset = Issue("Unique Asset", "Test NFT", 1, 0, false, unit, height)
3333 let assetId = calculateAssetId(asset)
34-[StringEntry("lastPlay", toBase58String(randhash)), asset, ScriptTransfer(inv.caller, 1, assetId)]
34+[BinaryEntry("lastPlay", randhash), asset, ScriptTransfer(inv.caller, 1, assetId)]
3535 }
36- else [StringEntry("lastPlay", toBase58String(randhash))]
36+ else [BinaryEntry("lastPlay", randhash)]
3737 }
3838 }
3939
4040

github/deemru/w8io/026f985 
41.03 ms