tx · BfDmeWniqjeMRSNmqUnAk3hGYMvEpACHnaBEmmAngkh9

3MxUc3EY15cLQ5DC2RFHip9fhgvfYXMBJWC:  -0.01000000 Waves

2019.11.18 15:57 [770594] smart account 3MxUc3EY15cLQ5DC2RFHip9fhgvfYXMBJWC > SELF 0.00000000 Waves

{ "type": 13, "id": "BfDmeWniqjeMRSNmqUnAk3hGYMvEpACHnaBEmmAngkh9", "fee": 1000000, "feeAssetId": null, "timestamp": 1574081862670, "version": 1, "sender": "3MxUc3EY15cLQ5DC2RFHip9fhgvfYXMBJWC", "senderPublicKey": "43T1oshbTi2AGge8rNsGJT8NcwcQRuQECwjQbqVNoatk", "proofs": [ "5jgjtBXGdi6TLPNALe3VqANKgQoLqvMomZWm6zShT4kWjdj18UFBX3Aos8T9jyuZBXhUcVZRjxpP7kZcyXEFXyuo" ], "script": "base64:AAIDAAAAAAAAAAsIARIDCgEIEgASAAAAAAQAAAAAE2xvdHRlcnlUaWNrZXRIb2xkZXIJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVQ4P5nX6vSfyUWDKUd2jZ8m1z30aeOCEYkAAAAADGxvdHRlcnlPd25lcgIAAAAjM014VWMzRVkxNWNMUTVEQzJSRkhpcDlmaGd2ZllYTUJKV0MAAAAAC293bmVyUHViS2V5AQAAACAtM6LuI4Ki6d46xtYv3fKoiMOpWfPJHt2lEDbAVH+MXQAAAAARZEFwcFJhbmRvbUFkZHJlc3MJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVQuUBI6cLpNCWqtTFL7swar/kDqojwMmeQAAAADAAAACmNvbnRleHRPYmoBAAAAF3JlZ2lzdGVyUmFuZG9tUmVxdWVzdFR4AAAAAQAAAA9yYW5kb21SZXF1ZXN0VHgDCQEAAAAJaXNEZWZpbmVkAAAAAQkABB0AAAACBQAAAAR0aGlzAgAAAA9yYW5kb21SZXF1ZXN0VHgJAAACAAAAAQIAAAAncmFuZG9tUmVxdWVzdFR4IGlzIGFscmVhZHkgaW4gdGhlI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LZXkHCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAALb3duZXJQdWJLZXnD5/D3", "chainId": 84, "height": 770594, "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 = Address(base58'3Mu3VojZPzNywADRSzwWC7ituSvQbNaVqvx')
5+
6+let b = "3MxUc3EY15cLQ5DC2RFHip9fhgvfYXMBJWC"
7+
8+let c = base58'43T1oshbTi2AGge8rNsGJT8NcwcQRuQECwjQbqVNoatk'
9+
10+let d = Address(base58'3Mt8xnBwt6AmXbKaNXGB9oQYYbKAQoEKaxj')
11+
12+@Callable(e)
13+func registerRandomRequestTx (f) = if (isDefined(getString(this, "randomRequestTx")))
14+ then throw("randomRequestTx is already in the state")
15+ else if (isDefined(transactionHeightById(fromBase58String(f))))
16+ then throw("You try register tx which is already in blockchain")
17+ else if ((e.caller == addressFromString(b)))
18+ then WriteSet([DataEntry("randomRequestTx", f)])
19+ else throw("only owner can start the lottery")
20+
21+
22+
23+@Callable(e)
24+func checkRandom () = {
25+ let g = getStringValue(this, "randomRequestTx")
26+ let h = getStringValue(d, g)
27+ let i = split(h, "_")[0]
28+ let j = split(h, "--")[1]
29+ if ((i == "FINISHED"))
30+ then WriteSet([DataEntry("randomResult", parseIntValue(j))])
31+ else throw("Incorrect random result")
32+ }
33+
34+
35+
36+@Callable(e)
37+func defineTheWinner () = {
38+ let j = getIntegerValue(this, "randomResult")
39+ if (isDefined(getInteger(a, ("winningTicket" + toString(j)))))
40+ then {
41+ let k = getIntegerValue(a, "ticketAmount")
42+ let l = if ((j == k))
43+ then 1
44+ else (j + 1)
45+ WriteSet([DataEntry("randomResult", l)])
46+ }
47+ else {
48+ let m = getStringValue(a, ("ticket" + toString(j)))
49+ WriteSet([DataEntry("winnerTicket", j), DataEntry("winnerAddress", m)])
50+ }
51+ }
52+
53+
54+@Verifier(n)
55+func o () = {
56+ let p = 1
57+ let q = 1000000000000
58+ let r = n
59+ if ($isInstanceOf(r, "LeaseTransaction"))
60+ then {
61+ let s = r
62+ if (if (if ((height > p))
63+ then (q > height)
64+ else false)
65+ then isDefined(getString(this, "winnerAddress"))
66+ else false)
67+ then (s.recipient == addressFromString(getStringValue(this, "winnerAddress")))
68+ else false
69+ }
70+ else if ($isInstanceOf(r, "LeaseCancelTransaction"))
71+ then {
72+ let t = r
73+ if ((height > p))
74+ then sigVerify(n.bodyBytes, n.proofs[0], c)
75+ else false
76+ }
77+ else if ($isInstanceOf(r, "TransferTransaction"))
78+ then {
79+ let u = r
80+ if ((height > p))
81+ then sigVerify(n.bodyBytes, n.proofs[0], c)
82+ else false
83+ }
84+ else sigVerify(n.bodyBytes, n.proofs[0], c)
85+ }
86+

github/deemru/w8io/026f985 
14.54 ms