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 |
---|
26 | 26 | | |
---|
27 | 27 | | |
---|
28 | 28 | | @Callable(c) |
---|
29 | | - | func addWinner (h,i) = { |
---|
30 | | - | let j = extract(addressFromString(h)) |
---|
| 29 | + | func addWinner (h) = { |
---|
| 30 | + | let i = extract(addressFromString(h)) |
---|
31 | 31 | | if (isDefined(getString(this, h))) |
---|
32 | 32 | | then { |
---|
33 | | - | let k = getStringValue(j, "winnerAddress") |
---|
34 | | - | let l = getIntegerValue(j, "winnerTicket") |
---|
35 | | - | WriteSet([DataEntry(("winningTicket" + toString(l)), k)]) |
---|
| 33 | + | let j = getStringValue(i, "winnerAddress") |
---|
| 34 | + | let k = getIntegerValue(i, "winnerTicket") |
---|
| 35 | + | WriteSet([DataEntry(("winningTicket" + toString(k)), j)]) |
---|
36 | 36 | | } |
---|
37 | 37 | | else throw("you touch incorrect lottery address") |
---|
38 | 38 | | } |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = 10000 |
---|
5 | 5 | | |
---|
6 | 6 | | let b = "8afYrbDBr6Tw5JgaWUgm2GncY7rL87JvGG7aWezWMGgZ" |
---|
7 | 7 | | |
---|
8 | 8 | | @Callable(c) |
---|
9 | 9 | | func buyTicket (d) = { |
---|
10 | 10 | | let e = c.payment |
---|
11 | 11 | | if ($isInstanceOf(e, "AttachedPayment")) |
---|
12 | 12 | | then { |
---|
13 | 13 | | let f = e |
---|
14 | 14 | | if (if ((f.amount == a)) |
---|
15 | 15 | | then (toBase58String(extract(f.assetId)) == b) |
---|
16 | 16 | | else false) |
---|
17 | 17 | | then { |
---|
18 | 18 | | let g = (getIntegerValue(this, "ticketAmount") + 1) |
---|
19 | 19 | | WriteSet([DataEntry(("ticket" + toString(g)), d), DataEntry("ticketAmount", g)]) |
---|
20 | 20 | | } |
---|
21 | 21 | | else throw("Incorrect amount or assetId in payment") |
---|
22 | 22 | | } |
---|
23 | 23 | | else throw("Payment not attached") |
---|
24 | 24 | | } |
---|
25 | 25 | | |
---|
26 | 26 | | |
---|
27 | 27 | | |
---|
28 | 28 | | @Callable(c) |
---|
29 | | - | func addWinner (h,i) = { |
---|
30 | | - | let j = extract(addressFromString(h)) |
---|
| 29 | + | func addWinner (h) = { |
---|
| 30 | + | let i = extract(addressFromString(h)) |
---|
31 | 31 | | if (isDefined(getString(this, h))) |
---|
32 | 32 | | then { |
---|
33 | | - | let k = getStringValue(j, "winnerAddress") |
---|
34 | | - | let l = getIntegerValue(j, "winnerTicket") |
---|
35 | | - | WriteSet([DataEntry(("winningTicket" + toString(l)), k)]) |
---|
| 33 | + | let j = getStringValue(i, "winnerAddress") |
---|
| 34 | + | let k = getIntegerValue(i, "winnerTicket") |
---|
| 35 | + | WriteSet([DataEntry(("winningTicket" + toString(k)), j)]) |
---|
36 | 36 | | } |
---|
37 | 37 | | else throw("you touch incorrect lottery address") |
---|
38 | 38 | | } |
---|
39 | 39 | | |
---|
40 | 40 | | |
---|