tx · DsLqiiierFpJJiPYRDhMR3yquRSguCaVjpt96ekyY4qA 3Mu3VojZPzNywADRSzwWC7ituSvQbNaVqvx: -0.01000000 Waves 2019.11.18 15:57 [770594] smart account 3Mu3VojZPzNywADRSzwWC7ituSvQbNaVqvx > SELF 0.00000000 Waves
{ "type": 13, "id": "DsLqiiierFpJJiPYRDhMR3yquRSguCaVjpt96ekyY4qA", "fee": 1000000, "feeAssetId": null, "timestamp": 1574081856706, "version": 1, "sender": "3Mu3VojZPzNywADRSzwWC7ituSvQbNaVqvx", "senderPublicKey": "Eo7Lfz5mskssmGeVL7ohvYK3Vvvv6TeqsoqgPNkUenVn", "proofs": [ "34yAwRuWhtp7RyRAXVAFfTEHF6KCfSfV979w4xud68eEucdSbBFfeCtbV2tYxRYbqBzYQQTC9Yd5oaaQRuLzwkK9" ], "script": "base64:AAIDAAAAAAAAAAwIARIDCgEIEgMKAQgAAAADAAAAAAt0aWNrZXRQcmljZQAAAAAAAAAnEAAAAAAFTVJUaWQBAAAAIHChkBw36JTYWgsazkDpCyVgxVwrjSJEZ1FQeglRlz1iAQAAAA9nZXRUaWNrZXRBbW91bnQAAAAABAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMCAAAADHRpY2tldEFtb3VudAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAAAAAgAAAApjb250ZXh0T2JqAQAAAAlidXlUaWNrZXQAAAABAAAADWFkZHJlc1RvTGVhc2UEAAAAByRtYXRjaDAIBQAAAApjb250ZXh0T2JqAAAAB3BheW1lbnQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0F0dGFjaGVkUGF5bWVudAQAAAABcAUAAAAHJG1hdGNoMAMDCQAAAAAAAAIIBQAAAAFwAAAABmFtb3VudAUAAAALdGlja2V0UHJpY2UJAAAAAAAAAggFAAAAAXAAAAAHYXNzZXRJZAUAAAAFTVJUaWQHBAAA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ZXJ5IGFkZHJlc3MAAAAA9w5Vpg==", "chainId": 84, "height": 770594, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = 10000 | |
5 | + | ||
6 | + | let b = base58'8afYrbDBr6Tw5JgaWUgm2GncY7rL87JvGG7aWezWMGgZ' | |
7 | + | ||
8 | + | func c () = { | |
9 | + | let d = getInteger(this, "ticketAmount") | |
10 | + | if ($isInstanceOf(d, "Int")) | |
11 | + | then { | |
12 | + | let e = d | |
13 | + | e | |
14 | + | } | |
15 | + | else 0 | |
16 | + | } | |
17 | + | ||
18 | + | ||
19 | + | @Callable(f) | |
20 | + | func buyTicket (g) = { | |
21 | + | let d = f.payment | |
22 | + | if ($isInstanceOf(d, "AttachedPayment")) | |
23 | + | then { | |
24 | + | let h = d | |
25 | + | if (if ((h.amount == a)) | |
26 | + | then (h.assetId == b) | |
27 | + | else false) | |
28 | + | then { | |
29 | + | let i = (c() + 1) | |
30 | + | WriteSet([DataEntry(("ticket" + toString(i)), g), DataEntry("ticketAmount", i)]) | |
31 | + | } | |
32 | + | else throw("Incorrect amount or assetId in payment") | |
33 | + | } | |
34 | + | else throw("Payment not attached") | |
35 | + | } | |
36 | + | ||
37 | + | ||
38 | + | ||
39 | + | @Callable(f) | |
40 | + | func addWinner (j) = { | |
41 | + | let k = extract(addressFromString(j)) | |
42 | + | if (isDefined(getBoolean(this, j))) | |
43 | + | then { | |
44 | + | let l = getStringValue(k, "winnerAddress") | |
45 | + | let m = getIntegerValue(k, "winnerTicket") | |
46 | + | WriteSet([DataEntry(("winningTicket" + toString(m)), l)]) | |
47 | + | } | |
48 | + | else throw("you touch incorrect lottery address") | |
49 | + | } | |
50 | + | ||
51 | + |
github/deemru/w8io/026f985 15.50 ms ◑