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:
Old | New | | Differences |
---|
19 | 19 | | |
---|
20 | 20 | | |
---|
21 | 21 | | @Callable(b) |
---|
22 | | - | func lotto () = if (if ((size(b.payments) != 1)) |
---|
| 22 | + | func lotto () = if (if ((size(b.payments) == 0)) |
---|
23 | 23 | | then true |
---|
24 | 24 | | else isDefined(b.payments[0])) |
---|
25 | 25 | | then throw("Should be with Payment in Waves") |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | func a (b) = { |
---|
5 | 5 | | let c = { |
---|
6 | 6 | | let d = getBinary(this, "lastPlay") |
---|
7 | 7 | | if ($isInstanceOf(d, "ByteVector")) |
---|
8 | 8 | | then { |
---|
9 | 9 | | let e = d |
---|
10 | 10 | | e |
---|
11 | 11 | | } |
---|
12 | 12 | | else if ($isInstanceOf(d, "Unit")) |
---|
13 | 13 | | then base58'2ee4oFDYriWJ9EMeR' |
---|
14 | 14 | | else throw("Match error") |
---|
15 | 15 | | } |
---|
16 | 16 | | let f = (((((c + b.transactionId) + b.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height)) |
---|
17 | 17 | | sha256(f) |
---|
18 | 18 | | } |
---|
19 | 19 | | |
---|
20 | 20 | | |
---|
21 | 21 | | @Callable(b) |
---|
22 | | - | func lotto () = if (if ((size(b.payments) != 1)) |
---|
| 22 | + | func lotto () = if (if ((size(b.payments) == 0)) |
---|
23 | 23 | | then true |
---|
24 | 24 | | else isDefined(b.payments[0])) |
---|
25 | 25 | | then throw("Should be with Payment in Waves") |
---|
26 | 26 | | else { |
---|
27 | 27 | | let g = a(b) |
---|
28 | 28 | | if ((500 > (toInt(g) % 1000))) |
---|
29 | 29 | | then { |
---|
30 | 30 | | let h = Issue("Unique Asset", "Test NFT", 1, 0, false, unit, height) |
---|
31 | 31 | | let i = calculateAssetId(h) |
---|
32 | 32 | | [BinaryEntry("lastPlay", g), h, ScriptTransfer(b.caller, 1, i)] |
---|
33 | 33 | | } |
---|
34 | 34 | | else [BinaryEntry("lastPlay", g)] |
---|
35 | 35 | | } |
---|
36 | 36 | | |
---|
37 | 37 | | |
---|