tx · 75e2tUKSVnjdy274pxNh7SB5PycZUZZvQvHZLNzef89v 3MrC1oqVCoLkfHabhJtrLJS6GxcooQwRWuP: -0.01000000 Waves 2019.11.13 15:05 [763277] smart account 3MrC1oqVCoLkfHabhJtrLJS6GxcooQwRWuP > SELF 0.00000000 Waves
{ "type": 13, "id": "75e2tUKSVnjdy274pxNh7SB5PycZUZZvQvHZLNzef89v", "fee": 1000000, "feeAssetId": null, "timestamp": 1573646492455, "version": 1, "sender": "3MrC1oqVCoLkfHabhJtrLJS6GxcooQwRWuP", "senderPublicKey": "3bmZaUZ9wp3K1YZQFqTkN1oZzumQPi7WLQ9QowMaqqEZ", "proofs": [ "26KeknjA7p6wU99E5vq4DtUYbFZfAKRJfKiXhpgtpbbJTtPkEu6NQraUsG45ftF3Y71dtjAhYz1277rkxcnobCbz" ], "script": "base64:AAIDAAAAAAAAAA0IARIDCgEIEgQKAggBAAAAAgAAAAALdGlja2V0UHJpY2UAAAAAAAAAJxAAAAAABU1SVGlkAgAAACw4YWZZcmJEQnI2VHc1SmdhV1VnbTJHbmNZN3JMODdKdkdHN2FXZXpXTUdnWgAAAAIAAAAKY29udGV4dE9iagEAAAAJYnV5VGlja2V0AAAAAQAAAA1hZGRyZXNUb0xlYXNlBAAAAAdwYXltZW50BAAAAAckbWF0Y2gwCAUAAAAKY29udGV4dE9iagAAAAdwYXltZW50AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9BdHRhY2hlZFBheW1lbnQEAAAAAXAFAAAAByRtYXRjaDADAwkBAAAAAiE9AAAAAggFAAAAAXAAAAAGYW1vdW50BQAAAAt0aWNrZXRQcmljZQkBAAAAAiE9AAAAAgkAAlgAAAABCQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFwAAAAB2Fzc2V0SWQFAAAABU1SVGlkBwkAAAIAAAABAgAAACZJbmNvcnJlY3QgYW1vdW50IG9yIGFzc2V0SWQgaW4gcGF5bWVudAUAAAABcAkAAAIAAAABAgAAABRQYXltZW50IG5vdCBhdHRhY2hlZAQAAAAPdGlja2V0QW1vdW50TmV3CQAAZAAAAAIJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMCAAAADHRpY2tldEFtb3VudAAAAAAAAAAAAQkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACAgAAAAZ0aWNrZXQJAAGkAAAAAQUAAAAPdGlja2V0QW1vdW50TmV3BQAAAA1hZGRyZXNUb0xlYXNlCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAAx0aWNrZXRBbW91bnQFAAAAD3RpY2tldEFtb3VudE5ldwUAAAADbmlsAAAACmNvbnRleHRPYmoBAAAACWFkZFdpbm5lcgAAAAIAAAAHbG90dGVyeQAAAAZ0aWNrZXQEAAAADmxvdHRlcnlBZGRyZXNzCQEAAAAHZXh0cmFjdAAAAAEJAQAAABFhZGRyZXNzRnJvbVN0cmluZwAAAAEFAAAAB2xvdHRlcnkDCQEAAAAJaXNEZWZpbmVkAAAAAQkABB0AAAACBQAAAAR0aGlzBQAAAAdsb3R0ZXJ5BAAAAA13aW5uZXJBZGRyZXNzCQAEHQAAAAIFAAAADmxvdHRlcnlBZGRyZXNzAgAAAAZ3aW5uZXIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAADXdpbm5pbmdUaWNrZXQFAAAABnRpY2tldAUAAAADbmlsCQAAAgAAAAECAAAAI3lvdSB0b3VjaCBpbmNvcnJlY3QgbG90dGVyeSBhZGRyZXNzAAAAAMAvtkY=", "chainId": 84, "height": 763277, "spentComplexity": 0 } View: original | compacted Prev: none Next: A2J74JFqzsjxaUbLcf9DJS54piCshgtVvspZVc7wuMTU 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 = "8afYrbDBr6Tw5JgaWUgm2GncY7rL87JvGG7aWezWMGgZ" | |
7 | + | ||
8 | + | @Callable(c) | |
9 | + | func buyTicket (d) = { | |
10 | + | let e = { | |
11 | + | let f = c.payment | |
12 | + | if ($isInstanceOf(f, "AttachedPayment")) | |
13 | + | then { | |
14 | + | let g = f | |
15 | + | if (if ((g.amount != a)) | |
16 | + | then (toBase58String(extract(g.assetId)) != b) | |
17 | + | else false) | |
18 | + | then throw("Incorrect amount or assetId in payment") | |
19 | + | else g | |
20 | + | } | |
21 | + | else throw("Payment not attached") | |
22 | + | } | |
23 | + | let h = (getIntegerValue(this, "ticketAmount") + 1) | |
24 | + | WriteSet([DataEntry(("ticket" + toString(h)), d), DataEntry("ticketAmount", h)]) | |
25 | + | } | |
26 | + | ||
27 | + | ||
28 | + | ||
29 | + | @Callable(c) | |
30 | + | func addWinner (i,j) = { | |
31 | + | let k = extract(addressFromString(i)) | |
32 | + | if (isDefined(getString(this, i))) | |
33 | + | then { | |
34 | + | let l = getString(k, "winner") | |
35 | + | WriteSet([DataEntry("winningTicket", j)]) | |
36 | + | } | |
37 | + | else throw("you touch incorrect lottery address") | |
38 | + | } | |
39 | + | ||
40 | + |
github/deemru/w8io/026f985 18.36 ms ◑