tx · AEaHTefo6PjA3d37Cv6rkSjs1kKJjWy7ZVWUQTYrAQbC
3MrC1oqVCoLkfHabhJtrLJS6GxcooQwRWuP: -0.01400000 Waves
2019.11.15 12:07 [765991] smart account 3MrC1oqVCoLkfHabhJtrLJS6GxcooQwRWuP > SELF 0.00000000 Waves
{
"type": 13,
"id": "AEaHTefo6PjA3d37Cv6rkSjs1kKJjWy7ZVWUQTYrAQbC",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1573808878671,
"version": 1,
"sender": "3MrC1oqVCoLkfHabhJtrLJS6GxcooQwRWuP",
"senderPublicKey": "3bmZaUZ9wp3K1YZQFqTkN1oZzumQPi7WLQ9QowMaqqEZ",
"proofs": [
"2qFfujATXSJZhKKJin5vPYUmXVsVUuJF2dQLAGdTCGYwoFYVqPg2YtdByV728M7uGnTgDnPNSv2CZk2e1ZMGws5w"
],
"script": "base64:AAIDAAAAAAAAAAwIARIDCgEIEgMKAQgAAAACAAAAAAt0aWNrZXRQcmljZQAAAAAAAAAnEAAAAAAFTVJUaWQCAAAALDhhZllyYkRCcjZUdzVKZ2FXVWdtMkduY1k3ckw4N0p2R0c3YVdleldNR2daAAAAAgAAAApjb250ZXh0T2JqAQAAAAlidXlUaWNrZXQAAAABAAAADWFkZHJlc1RvTGVhc2UEAAAAByRtYXRjaDAIBQAAAApjb250ZXh0T2JqAAAAB3BheW1lbnQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0F0dGFjaGVkUGF5bWVudAQAAAABcAUAAAAHJG1hdGNoMAMDCQAAAAAAAAIIBQAAAAFwAAAABmFtb3VudAUAAAALdGlja2V0UHJpY2UJAAAAAAAAAgkAAlgAAAABCQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFwAAAAB2Fzc2V0SWQFAAAABU1SVGlkBwQAAAAPdGlja2V0QW1vdW50TmV3CQAAZAAAAAIJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMCAAAADHRpY2tldEFtb3Vud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View: original | compacted
Prev: 2as9TnjHo2pu1BxK6VttkgSZq1uSKQXimx9HV1SumSDp
Next: J7iWmSH2DdnaqvG88AKpfMMBVPWT6i7kW9juqb8MAx3a
Diff:
Old | New | | Differences |
---|
23 | 23 | | |
---|
24 | 24 | | |
---|
25 | 25 | | @Callable(contextObj) |
---|
26 | | - | func addWinner (lottery,ticket) = { |
---|
| 26 | + | func addWinner (lottery) = { |
---|
27 | 27 | | let lotteryAddress = extract(addressFromString(lottery)) |
---|
28 | 28 | | if (isDefined(getString(this, lottery))) |
---|
29 | 29 | | then { |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let ticketPrice = 10000 |
---|
5 | 5 | | |
---|
6 | 6 | | let MRTid = "8afYrbDBr6Tw5JgaWUgm2GncY7rL87JvGG7aWezWMGgZ" |
---|
7 | 7 | | |
---|
8 | 8 | | @Callable(contextObj) |
---|
9 | 9 | | func buyTicket (addresToLease) = match contextObj.payment { |
---|
10 | 10 | | case p: AttachedPayment => |
---|
11 | 11 | | if (if ((p.amount == ticketPrice)) |
---|
12 | 12 | | then (toBase58String(extract(p.assetId)) == MRTid) |
---|
13 | 13 | | else false) |
---|
14 | 14 | | then { |
---|
15 | 15 | | let ticketAmountNew = (getIntegerValue(this, "ticketAmount") + 1) |
---|
16 | 16 | | WriteSet([DataEntry(("ticket" + toString(ticketAmountNew)), addresToLease), DataEntry("ticketAmount", ticketAmountNew)]) |
---|
17 | 17 | | } |
---|
18 | 18 | | else throw("Incorrect amount or assetId in payment") |
---|
19 | 19 | | case _ => |
---|
20 | 20 | | throw("Payment not attached") |
---|
21 | 21 | | } |
---|
22 | 22 | | |
---|
23 | 23 | | |
---|
24 | 24 | | |
---|
25 | 25 | | @Callable(contextObj) |
---|
26 | | - | func addWinner (lottery,ticket) = { |
---|
| 26 | + | func addWinner (lottery) = { |
---|
27 | 27 | | let lotteryAddress = extract(addressFromString(lottery)) |
---|
28 | 28 | | if (isDefined(getString(this, lottery))) |
---|
29 | 29 | | then { |
---|
30 | 30 | | let winnerAddress = getStringValue(lotteryAddress, "winnerAddress") |
---|
31 | 31 | | let winnerTicket = getIntegerValue(lotteryAddress, "winnerTicket") |
---|
32 | 32 | | WriteSet([DataEntry(("winningTicket" + toString(winnerTicket)), winnerAddress)]) |
---|
33 | 33 | | } |
---|
34 | 34 | | else throw("you touch incorrect lottery address") |
---|
35 | 35 | | } |
---|
36 | 36 | | |
---|
37 | 37 | | |
---|