tx · CLunczyZF2LBDrj68iUwnyxRasNED3godnxN55d7KRsA 3N9yCRmNsLK2aPStjLBne3EUiPSKvVHYgKk: -0.05000000 Waves 2020.09.25 13:44 [1192741] smart account 3N9yCRmNsLK2aPStjLBne3EUiPSKvVHYgKk > SELF 0.00000000 Waves
{ "type": 13, "id": "CLunczyZF2LBDrj68iUwnyxRasNED3godnxN55d7KRsA", "fee": 5000000, "feeAssetId": null, "timestamp": 1601030654016, "version": 2, "chainId": 84, "sender": "3N9yCRmNsLK2aPStjLBne3EUiPSKvVHYgKk", "senderPublicKey": "7nLAwoiRA4fWF4VHd6gRsbwF2UFFmRADXHqRcgy3h27w", "proofs": [ "4aUw4TFZP9DTuASiT4KWgpbnJgDMSD92ub85wgL5CQr1goebNiJdUYaHxrsf5Jkadbp9wwK45bTTUoc197ofd44p" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAAAAAAAAEAAAADaW52AQAAAANmb28AAAAABAAAAAVpc3N1ZQkABEIAAAAFAgAAAAxDcnlwdG9Sb3VibGUCAAAAC0Rlc2NyaXB0aW9uAAAAAAAAAAPoAAAAAAAAAAACBgQAAAACaWQJAAQ4AAAAAQUAAAAFaXNzdWUJAARMAAAAAgUAAAAFaXNzdWUJAARMAAAAAgkBAAAAC0JpbmFyeUVudHJ5AAAAAgIAAAACaWQFAAAAAmlkBQAAAANuaWwAAAAA8xlXWA==", "height": 1192741, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 28hbeFhYBq6uir1bbjt2dxbpqxCM2B6GKq4c7zf7AbkX Next: A8Yw9ax5SumPgTnALVFDudNTzuNawLsYqntFZ762M2oH Full:
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | func randomizer (inv) = { | |
5 | - | let lastPlay = match getBinary(this, "lastPlay") { | |
6 | - | case s: ByteVector => | |
7 | - | s | |
8 | - | case a: Unit => | |
9 | - | base58'2ee4oFDYriWJ9EMeR' | |
10 | - | case _ => | |
11 | - | throw() | |
12 | - | } | |
13 | - | let rand = (((((lastPlay + inv.transactionId) + inv.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height)) | |
14 | - | sha256(rand) | |
15 | - | } | |
16 | - | ||
17 | - | ||
18 | - | func startLotto (inv) = { | |
19 | - | let playLimit = (wavesBalance(this) / 100) | |
20 | - | let payment = extract(inv.payment) | |
21 | - | if (!(isDefined(inv.payment))) | |
22 | - | then throw("Should be with Payment in Waves") | |
23 | - | else if (isDefined(payment.assetId)) | |
24 | - | then throw("Payment should be in Waves") | |
25 | - | else if ((payment.amount > playLimit)) | |
26 | - | then throw(("Payment should be less than " + toString(playLimit))) | |
27 | - | else { | |
28 | - | let randhash = randomizer(inv) | |
29 | - | let winTransfer = TransferSet([ScriptTransfer(inv.caller, ((payment.amount * 190) / 100), unit)]) | |
30 | - | let writeLastPlay = WriteSet([DataEntry("lastPlay", randhash)]) | |
31 | - | if ((500 > (toInt(randhash) % 1000))) | |
32 | - | then ScriptResult(writeLastPlay, winTransfer) | |
33 | - | else ScriptResult(writeLastPlay, TransferSet(nil)) | |
34 | - | } | |
35 | - | } | |
36 | 4 | ||
37 | 5 | ||
38 | 6 | @Callable(inv) | |
39 | - | func lotto () = startLotto(inv) | |
40 | - | ||
41 | - | ||
42 | - | ||
43 | - | @Callable(inv) | |
44 | - | func default () = startLotto(inv) | |
7 | + | func foo () = { | |
8 | + | let issue = Issue("CryptoRouble", "Description", 1000, 2, true) | |
9 | + | let id = calculateAssetId(issue) | |
10 | + | [issue, BinaryEntry("id", id)] | |
11 | + | } | |
45 | 12 | ||
46 | 13 |
github/deemru/w8io/169f3d6 27.00 ms ◑