tx · B3kAmFFgRkfHfiDmFzvb6oUjRxAeYQ2MzCqjkiWGMBuB 3Mp1GGUhbaJVu7Eaf8bKMGr3B29GVjrketT: -0.01400000 Waves 2019.11.13 13:35 [763188] smart account 3Mp1GGUhbaJVu7Eaf8bKMGr3B29GVjrketT > SELF 0.00000000 Waves
{ "type": 13, "id": "B3kAmFFgRkfHfiDmFzvb6oUjRxAeYQ2MzCqjkiWGMBuB", "fee": 1400000, "feeAssetId": null, "timestamp": 1573641339019, "version": 1, "sender": "3Mp1GGUhbaJVu7Eaf8bKMGr3B29GVjrketT", "senderPublicKey": "DbiR14ueb9NPcXN29auNX8QYMDkJ1f1K4wZwA1aYrJmy", "proofs": [ "66zxs7zXcZzBwZ7ouvqxRmxWgdwpKYKU6B757GaNx3RKZ7NGsuSLtJmNSGRhdARAo4PRX7EJXJrPPGwUR3WvAS1t" ], "script": "base64:AAIDAAAAAAAAAA0IARIDCgEIEgQKAggBAAAAAgAAAAALdGlja2V0UHJpY2UAAAAAAAAAJxAAAAAABU1SVGlkAgAAACw4YWZZcmJEQnI2VHc1SmdhV1VnbTJHbmNZN3JMODdKdkdHN2FXZXpXTUdnWgAAAAIAAAAKY29udGV4dE9iagEAAAAJYnV5VGlja2V0AAAAAQAAAA1hZGRyZXNUb0xlYXNlBAAAAAdwYXltZW50BAAAAAckbWF0Y2gwCAUAAAAKY29udGV4dE9iagAAAAdwYXltZW50AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9BdHRhY2hlZFBheW1lbnQEAAAAAXAFAAAAByRtYXRjaDADAwkBAAAAAiE9AAAAAggFAAAAAXAAAAAGYW1vdW50BQAAAAt0aWNrZXRQcmljZQkBAAAAAiE9AAAAAgkAAlgAAAABCQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFwAAAAB2Fzc2V0SWQFAAAABU1SVGlkBwkAAAIAAAABAgAAACZJbmNvcnJlY3QgYW1vdW50IG9yIGFzc2V0SWQgaW4gcGF5bWVudAUAAAABcAkAAAIAAAABAgAAABRQYXltZW50IG5vdCBhdHRhY2hlZAQAAAAPdGlja2V0QW1vdW50TmV3CQAAZAAAAAIJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMCAAAADHRpY2tldEFtb3VudAAAAAAAAAAAAQkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACAgAAAAZ0aWNrZXQJAAGkAAAAAQUAAAAPdGlja2V0QW1vdW50TmV3BQAAAA1hZGRyZXNUb0xlYXNlCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAAx0aWNrZXRBbW91bnQFAAAAD3RpY2tldEFtb3VudE5ldwUAAAADbmlsAAAACmNvbnRleHRPYmoBAAAACWFkZFdpbm5lcgAAAAIAAAAHbG90dGVyeQAAAAZ0aWNrZXQEAAAADmxvdHRlcnlBZGRyZXNzCQEAAAAHZXh0cmFjdAAAAAEJAQAAABFhZGRyZXNzRnJvbVN0cmluZwAAAAEFAAAAB2xvdHRlcnkDCQEAAAAJaXNEZWZpbmVkAAAAAQkABB0AAAACBQAAAAR0aGlzBQAAAAdsb3R0ZXJ5BAAAAA13aW5uZXJBZGRyZXNzCQAEHQAAAAIFAAAADmxvdHRlcnlBZGRyZXNzAgAAAAZ3aW5uZXIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAADXdpbm5pbmdUaWNrZXQFAAAABnRpY2tldAUAAAADbmlsCQAAAgAAAAECAAAAI3lvdSB0b3VjaCBpbmNvcnJlY3QgbG90dGVyeSBhZGRyZXNzAAAAAMAvtkY=", "chainId": 84, "height": 763188, "spentComplexity": 0 } View: original | compacted Prev: Cs8Yr4zMkDrFgL9YbVNdB98ooeZjeXRKvQF1irBzj3P7 Next: 7217WYestxuoVxtWZbt3ZJPp3HypBYcuFUSseP1uRpav Diff:
Old | New | Differences | |
---|---|---|---|
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let ticketPrice = 10000 | |
5 | 5 | ||
6 | - | let MRTid = " | |
6 | + | let MRTid = "8afYrbDBr6Tw5JgaWUgm2GncY7rL87JvGG7aWezWMGgZ" | |
7 | 7 | ||
8 | 8 | @Callable(contextObj) | |
9 | 9 | func buyTicket (addresToLease) = { |
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 | - | let MRTid = " | |
6 | + | let MRTid = "8afYrbDBr6Tw5JgaWUgm2GncY7rL87JvGG7aWezWMGgZ" | |
7 | 7 | ||
8 | 8 | @Callable(contextObj) | |
9 | 9 | func buyTicket (addresToLease) = { | |
10 | 10 | let payment = match contextObj.payment { | |
11 | 11 | case p: AttachedPayment => | |
12 | 12 | if (if ((p.amount != ticketPrice)) | |
13 | 13 | then (toBase58String(extract(p.assetId)) != MRTid) | |
14 | 14 | else false) | |
15 | 15 | then throw("Incorrect amount or assetId in payment") | |
16 | 16 | else p | |
17 | 17 | case _ => | |
18 | 18 | throw("Payment not attached") | |
19 | 19 | } | |
20 | 20 | let ticketAmountNew = (getIntegerValue(this, "ticketAmount") + 1) | |
21 | 21 | WriteSet([DataEntry(("ticket" + toString(ticketAmountNew)), addresToLease), DataEntry("ticketAmount", ticketAmountNew)]) | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | ||
26 | 26 | @Callable(contextObj) | |
27 | 27 | func addWinner (lottery,ticket) = { | |
28 | 28 | let lotteryAddress = extract(addressFromString(lottery)) | |
29 | 29 | if (isDefined(getString(this, lottery))) | |
30 | 30 | then { | |
31 | 31 | let winnerAddress = getString(lotteryAddress, "winner") | |
32 | 32 | WriteSet([DataEntry("winningTicket", ticket)]) | |
33 | 33 | } | |
34 | 34 | else throw("you touch incorrect lottery address") | |
35 | 35 | } | |
36 | 36 | ||
37 | 37 |
github/deemru/w8io/169f3d6 37.45 ms ◑