tx · 9wDCCbs1kes3bu1iiV7S9gKk8Qz3fiEJN9hi6YAZZger

3N8vbCi8fbBq4cY8L3AWqQeq7VJR5FxvR7J:  -0.01000000 Waves

2021.09.25 21:35 [1718848] smart account 3N8vbCi8fbBq4cY8L3AWqQeq7VJR5FxvR7J > SELF 0.00000000 Waves

{ "type": 13, "id": "9wDCCbs1kes3bu1iiV7S9gKk8Qz3fiEJN9hi6YAZZger", "fee": 1000000, "feeAssetId": null, "timestamp": 1632595028549, "version": 2, "chainId": 84, "sender": "3N8vbCi8fbBq4cY8L3AWqQeq7VJR5FxvR7J", "senderPublicKey": "EkHiMGjZnobhmra42ocG6pxLtFnuq8oPJw2cR7hVSTM1", "proofs": [ "dAwwSCkCczGJs863mSF9mRFEcLcFQwSs9moBAwtWqWkY9q1ix8kQDkHwNGFeA3n73JiRfX9SdSeARVnJcirYbGN" ], "script": "base64:AAIFAAAAAAAAAIEIAhIAGhAKAmExEgpyYW5kb21pemVyGgkKAmEyEgNpbnYaDgoCYTMSCGxhc3RQbGF5Gg0KAmE0EgckbWF0Y2gwGgcKAmE1EgFzGgoKAmE2EgRyYW5kGg4KAmE3EghyYW5kaGFzaBoLCgJhOBIFYXNzZXQaDQoCYTkSB2Fzc2V0SWQAAAABAQAAAAJhMQAAAAEAAAACYTIEAAAAAmEzBAAAAAJhNAkABBwAAAACBQAAAAR0aGlzAgAAAAhsYXN0UGxheQMJAAABAAAAAgUAAAACYTQCAAAACkJ5dGVWZWN0b3IEAAAAAmE1BQAAAAJhNAUAAAACYTUDCQAAAQAAAAIFAAAAAmE0AgAAAARVbml0AQAAAAxXYXZlc0xvdHRvVjIJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IEAAAAAmE2CQAAywAAAAIJAADLAAAAAgkAAMsAAAACCQAAywAAAAIJAADLAAAAAgUAAAACYTMIBQAAAAJhMgAAAA10cmFuc2FjdGlvbklkCAUAAAACYTIAAAAPY2FsbGVyUHVibGljS2V5CAUAAAAJbGFzdEJsb2NrAAAAE2dlbmVyYXRpb25TaWduYXR1cmUJAAGaAAAAAQgFAAAACWxhc3RCbG9jawAAAAl0aW1lc3RhbXAJAAGaAAAAAQgFAAAACWxhc3RCbG9jawAAAAZoZWlnaHQJAAH3AAAAAQUAAAACYTYAAAABAAAAAmEyAQAAAAVsb3R0bwAAAAADAwkAAAAAAAACCQABkAAAAAEIBQAAAAJhMgAAAAhwYXltZW50cwAAAAAAAAAAAAYJAQAAAAlpc0RlZmluZWQAAAABCQABkQAAAAIIBQAAAAJhMgAAAAhwYXltZW50cwAAAAAAAAAAAAkAAAIAAAABAgAAAB9TaG91bGQgYmUgd2l0aCBQYXltZW50IGluIFdhdmVzBAAAAAJhNwkBAAAAAmExAAAAAQUAAAACYTIDCQAAZgAAAAIAAAAAAAAAAfQJAABqAAAAAgkABLEAAAABBQAAAAJhNwAAAAAAAAAD6AQAAAACYTgJAARDAAAABwIAAAAMVW5pcXVlIEFzc2V0AgAAAAhUZXN0IE5GVAAAAAAAAAAAAQAAAAAAAAAAAAcFAAAABHVuaXQFAAAABmhlaWdodAQAAAACYTkJAAQ4AAAAAQUAAAACYTgJAARMAAAAAgkBAAAAC0JpbmFyeUVudHJ5AAAAAgIAAAAIbGFzdFBsYXkFAAAAAmE3CQAETAAAAAIFAAAAAmE4CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAJhMgAAAAZjYWxsZXIAAAAAAAAAAAEFAAAAAmE5BQAAAANuaWwJAARMAAAAAgkBAAAAC0JpbmFyeUVudHJ5AAAAAgIAAAAIbGFzdFBsYXkFAAAAAmE3BQAAAANuaWwAAAAA8gtbSg==", "height": 1718848, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GgFxgiMzCKujQfjVKzady9R5uk1gag4PDtYNb1XmTnsm Next: 6qdn8hyP3gFUsGczQrQ6E7BsXefPSMeXGdDmoyQQoNUE Diff:
OldNewDifferences
1616
1717
1818 @Callable(inv)
19-func lotto () = if (if ((size(inv.payments) != 1))
19+func lotto () = if (if ((size(inv.payments) == 0))
2020 then true
2121 else isDefined(inv.payments[0]))
2222 then throw("Should be with Payment in Waves")
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)
19-func lotto () = if (if ((size(inv.payments) != 1))
19+func lotto () = if (if ((size(inv.payments) == 0))
2020 then true
2121 else isDefined(inv.payments[0]))
2222 then throw("Should be with Payment in Waves")
2323 else {
2424 let randhash = randomizer(inv)
2525 if ((500 > (toInt(randhash) % 1000)))
2626 then {
2727 let asset = Issue("Unique Asset", "Test NFT", 1, 0, false, unit, height)
2828 let assetId = calculateAssetId(asset)
2929 [BinaryEntry("lastPlay", randhash), asset, ScriptTransfer(inv.caller, 1, assetId)]
3030 }
3131 else [BinaryEntry("lastPlay", randhash)]
3232 }
3333
3434

github/deemru/w8io/026f985 
46.79 ms