tx · Ea759qxJ45yLFemEU1mCkfgjXesa9XEo8B2yK3Myx3uM

3N7tvef3FF3PwXeZfWHaiZkUnZiLUJfkTVr:  -0.01000000 Waves

2019.11.25 17:33 [780922] smart account 3N7tvef3FF3PwXeZfWHaiZkUnZiLUJfkTVr > SELF 0.00000000 Waves

{ "type": 13, "id": "Ea759qxJ45yLFemEU1mCkfgjXesa9XEo8B2yK3Myx3uM", "fee": 1000000, "feeAssetId": null, "timestamp": 1574692450951, "version": 1, "sender": "3N7tvef3FF3PwXeZfWHaiZkUnZiLUJfkTVr", "senderPublicKey": "9748xQ1cEgDDNfNRYiA4n7RcL184CCT7WsKuJZVPNGiA", "proofs": [ "4rikByU3eF5vmNE89A64vjGmeoNmssL9WZxAmGojYfVWseqzaLZiD5ZeWFn4T14nxhGv9Kc6563N39YUKMrnPfHv" ], "script": "base64:AAIDAAAAAAAAAAkIARIAEgMKAQgAAAADAAAAAAt0aWNrZXRQcmljZQAAAAAAAAAAAwAAAAAFTVJUaWQBAAAAIHChkBw36JTYWgsazkDpCyVgxVwrjSJEZ1FQeglRlz1iAQAAAA9nZXRUaWNrZXRBbW91bnQAAAAABAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMCAAAAEXRpY2tldEFtb3VudFRvdGFsAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAAAAACAAAACmNvbnRleHRPYmoBAAAACWJ1eVRpY2tldAAAAAAEAAAAByRtYXRjaDAIBQAAAApjb250ZXh0T2JqAAAAB3BheW1lbnQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0F0dGFjaGVkUGF5bWVudAQAAAABcAUAAAAHJG1hdGNoMAMDCQAAZwAAAAIIBQAAAAFwAAAABmFtb3VudAUAAAALdGlja2V0UHJpY2UJAAAAAAAAAggFAAAAAXAAAAAHYXNzZXRJZAUAAAAFTVJUaWQHBAAAABN0aWNrZXRzQnV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GwAAAAIFAAAABHRoaXMFAAAAB2xvdHRlcnkEAAAADXdpbm5lckFkZHJlc3MJAQAAABFAZXh0ck5hdGl2ZSgxMDUzKQAAAAIFAAAADmxvdHRlcnlBZGRyZXNzAgAAAA13aW5uZXJBZGRyZXNzBAAAAAx3aW5uZXJUaWNrZXQJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAADmxvdHRlcnlBZGRyZXNzAgAAAAx3aW5uZXJUaWNrZXQJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgIAAAANd2lubmluZ1RpY2tldAkAAaQAAAABBQAAAAx3aW5uZXJUaWNrZXQFAAAADXdpbm5lckFkZHJlc3MFAAAAA25pbAkAAAIAAAABAgAAACN5b3UgdG91Y2ggaW5jb3JyZWN0IGxvdHRlcnkgYWRkcmVzcwAAAACRyK/h", "chainId": 84, "height": 780922, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let a = 3
5+
6+let b = base58'8afYrbDBr6Tw5JgaWUgm2GncY7rL87JvGG7aWezWMGgZ'
7+
8+func c () = {
9+ let d = getInteger(this, "ticketAmountTotal")
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 () = {
21+ let d = f.payment
22+ if ($isInstanceOf(d, "AttachedPayment"))
23+ then {
24+ let g = d
25+ if (if ((g.amount >= a))
26+ then (g.assetId == b)
27+ else false)
28+ then {
29+ let h = (g.amount / a)
30+ let i = c()
31+ let j = (i + h)
32+ let k = toString((i + 1))
33+ let l = toString((i + h))
34+ let m = toString(f.caller)
35+ WriteSet([DataEntry(((("ticketsFrom" + k) + "To") + l), m), DataEntry("ticketAmountTotal", j)])
36+ }
37+ else throw("Incorrect amount or assetId in payment")
38+ }
39+ else throw("Payment not attached")
40+ }
41+
42+
43+
44+@Callable(f)
45+func addWinner (n) = {
46+ let o = addressFromStringValue(n)
47+ if (isDefined(getBoolean(this, n)))
48+ then {
49+ let p = getStringValue(o, "winnerAddress")
50+ let q = getIntegerValue(o, "winnerTicket")
51+ WriteSet([DataEntry(("winningTicket" + toString(q)), p)])
52+ }
53+ else throw("you touch incorrect lottery address")
54+ }
55+
56+

github/deemru/w8io/169f3d6 
25.88 ms