tx · 444cQjJ4rjJTwfZyY7RACgdndZhJY8UExxjrHAvvfANz

3N4NPivoThtskr7JxnNrKL7s8BzmRGx9rT2:  -0.01400000 Waves

2019.08.12 15:20 [627834] smart account 3N4NPivoThtskr7JxnNrKL7s8BzmRGx9rT2 > SELF 0.00000000 Waves

{ "type": 13, "id": "444cQjJ4rjJTwfZyY7RACgdndZhJY8UExxjrHAvvfANz", "fee": 1400000, "feeAssetId": null, "timestamp": 1565612433113, "version": 1, "sender": "3N4NPivoThtskr7JxnNrKL7s8BzmRGx9rT2", "senderPublicKey": "F3vhYapU4NBzfM2X4KNkoFcxj3UbYnJjqituG6KE7ZPG", "proofs": [ "3WHYm2ur881kw7eoN1Ldmpnqvjyq6X7tPHPtdKeauKEmyGaHPh1BpNLyusw7a1AfaFEL6f6HqnPcAqK9yPxph1oB" ], "script": "base64:AAIDAAAAAAAAAAAAAAAJAAAAAAdSVU5OSU5HAgAAAAdSVU5OSU5HAAAAAAZDTE9TRUQCAAAABkNMT1NFRAAAAAAJREFQUE9XTkVSAgAAACMzTjROUGl2b1RodHNrcjdKeG5OcktMN3M4QnptUkd4OXJUMgAAAAAFV0FWRVMCAAAABVdBVkVTAAAAAAROT05FAgAAAAROT05FAQAAAAtnZXROdW1CeUtleQAAAAEAAAADa2V5BAAAAANudW0EAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAFAAAAA251bQEAAAALZ2V0U3RyQnlLZXkAAAABAAAAA2tleQQAAAADc3RyBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhBQAAAAROT05FBQAAAANzdHIBAAAAEGdldENvbnRlc3RTdGF0dXMAAAAAB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FQGCQEAAAACIT0AAAACCAUAAAADcG10AAAABmFtb3VudAAAAAAAAAehIAkAAAIAAAABAgAAABpZb3UgbXVzdCBwYXkgNSBXTFQgdG8gYmV0LgMJAQAAAAIhPQAAAAIJAQAAAAZnZXRCZXQAAAABBQAAAA1jdXJyZW5jeVZhbHVlBQAAAAROT05FCQAAAgAAAAECAAAAIlNvbWVvbmUgYWxyZWFkeSBiZXQgb24gdGhpcyB2YWx1ZS4JAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAABGJldF8JAAGkAAAAAQUAAAARY29udGVzdEN1cnJOdW1iZXICAAAAAV8FAAAADWN1cnJlbmN5VmFsdWUFAAAAB2FjY291bnQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4AwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24GCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAF0ludm9rZVNjcmlwdFRyYW5zYWN0aW9uBgbgYxE5", "chainId": 84, "height": 627834, "spentComplexity": 0 } View: original | compacted Prev: GHpH2Pr3BzzUUeagvePuuyKa7bv4UzohXxasNMYKjQzC Next: 3GeV3g3qiPq4QuRpVgjWVX36BrRX2PjEajTKZQfyRvBu Diff:
OldNewDifferences
4545 }
4646
4747
48-@Callable(o)
49-func setContestStatus (p,q) = {
50- let r = toBase58String(o.caller.bytes)
51- if ((r != c))
48+func o (p) = {
49+ let n = f("contest_currentnumber")
50+ k(((("contest_" + toString(n)) + "_") + p))
51+ }
52+
53+
54+@Callable(q)
55+func setContestStatus (r,s) = {
56+ let t = toBase58String(q.caller.bytes)
57+ if ((t != c))
5258 then throw("Only dAPP Owner can set Contest Status.")
53- else if (if ((q != a))
54- then (q != b)
59+ else if (if ((s != a))
60+ then (s != b)
5561 else false)
56- then throw(("Invalid status: " + q))
57- else WriteSet([DataEntry((("contest_" + toString(p)) + "_status"), q)])
62+ then throw(("Invalid status: " + s))
63+ else WriteSet([DataEntry((("contest_" + toString(r)) + "_status"), s)])
5864 }
5965
6066
6167
62-@Callable(o)
63-func setContestConfiguration (s,t) = {
64- let r = toBase58String(o.caller.bytes)
65- let u = f("contest_currentnumber")
66- let v = k((("contest_" + toString(u)) + "_status"))
67- let n = (u + 1)
68- if ((r != c))
68+@Callable(q)
69+func setContestConfiguration (u,v) = {
70+ let t = toBase58String(q.caller.bytes)
71+ let w = f("contest_currentnumber")
72+ let x = k((("contest_" + toString(w)) + "_status"))
73+ let n = (w + 1)
74+ if ((t != c))
6975 then throw("Only dAPP Owner can Configure Contest.")
70- else if ((height >= t))
76+ else if ((height >= v))
7177 then throw(("Start Height must be greater than current Blockchain height: " + toString(height)))
72- else if ((v == a))
73- then throw(("You cannot configure a new Contest while old Contest status is: " + v))
74- else if ((s != d))
75- then throw((("dAPP does not support currency: " + s) + " yet."))
78+ else if ((x == a))
79+ then throw(("You cannot configure a new Contest while old Contest status is: " + x))
80+ else if ((u != d))
81+ then throw((("dAPP does not support currency: " + u) + " yet."))
7682 else {
77- let w = (t + (7 * 1440))
78- WriteSet([DataEntry("contest_currentnumber", n), DataEntry((("contest_" + toString(n)) + "_currency"), s), DataEntry((("contest_" + toString(n)) + "_startheight"), t), DataEntry((("contest_" + toString(n)) + "_finishheight"), w), DataEntry((("contest_" + toString(n)) + "_status"), a)])
83+ let y = (v + (7 * 1440))
84+ WriteSet([DataEntry("contest_currentnumber", n), DataEntry((("contest_" + toString(n)) + "_currency"), u), DataEntry((("contest_" + toString(n)) + "_startheight"), v), DataEntry((("contest_" + toString(n)) + "_finishheight"), y), DataEntry((("contest_" + toString(n)) + "_status"), a)])
7985 }
8086 }
8187
8288
8389
84-@Callable(o)
85-func bet (x) = {
86- let y = base58'2B3mWxfnhAaCpJuqbkbiD6HVCTEcgwdmzxFCjZe65NYg'
87- let r = toBase58String(o.caller.bytes)
88- let z = extract(o.payment)
90+@Callable(q)
91+func bet (p) = {
92+ let z = base58'2B3mWxfnhAaCpJuqbkbiD6HVCTEcgwdmzxFCjZe65NYg'
93+ let t = toBase58String(q.caller.bytes)
94+ let A = extract(q.payment)
8995 let n = f("contest_currentnumber")
90- let t = f((("contest_" + toString(n)) + "_startheight"))
91- let w = f((("contest_" + toString(n)) + "_finishheight"))
92- let q = k((("contest_" + toString(n)) + "_status"))
93- if ((height > (w - (2 * 1440))))
96+ let v = f((("contest_" + toString(n)) + "_startheight"))
97+ let y = f((("contest_" + toString(n)) + "_finishheight"))
98+ let s = k((("contest_" + toString(n)) + "_status"))
99+ if ((height > (y - (2 * 1440))))
94100 then throw("You cannot bet anymore at this height.")
95- else if ((q != a))
101+ else if ((s != a))
96102 then throw("Invalid status: you cannot bet now.")
97- else if (if ((z.assetId != y))
103+ else if (if ((A.assetId != z))
98104 then true
99- else (z.amount != 500000))
105+ else (A.amount != 500000))
100106 then throw("You must pay 5 WLT to bet.")
101- else WriteSet([DataEntry(((("bet_" + toString(n)) + "_") + r), x)])
107+ else if ((o(p) != e))
108+ then throw("Someone already bet on this value.")
109+ else WriteSet([DataEntry(((("bet_" + toString(n)) + "_") + p), t)])
102110 }
103111
104112
105-@Verifier(A)
106-func B () = {
107- let i = A
113+@Verifier(B)
114+func C () = {
115+ let i = B
108116 if (if ($isInstanceOf(i, "SetScriptTransaction"))
109117 then true
110118 else $isInstanceOf(i, "DataTransaction"))
111- then sigVerify(A.bodyBytes, A.proofs[0], A.senderPublicKey)
119+ then sigVerify(B.bodyBytes, B.proofs[0], B.senderPublicKey)
112120 else if ($isInstanceOf(i, "InvokeScriptTransaction"))
113121 then true
114122 else true
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "RUNNING"
55
66 let b = "CLOSED"
77
88 let c = "3N4NPivoThtskr7JxnNrKL7s8BzmRGx9rT2"
99
1010 let d = "WAVES"
1111
1212 let e = "NONE"
1313
1414 func f (g) = {
1515 let h = {
1616 let i = getInteger(this, g)
1717 if ($isInstanceOf(i, "Int"))
1818 then {
1919 let j = i
2020 j
2121 }
2222 else 0
2323 }
2424 h
2525 }
2626
2727
2828 func k (g) = {
2929 let l = {
3030 let i = getString(this, g)
3131 if ($isInstanceOf(i, "String"))
3232 then {
3333 let j = i
3434 j
3535 }
3636 else e
3737 }
3838 l
3939 }
4040
4141
4242 func m () = {
4343 let n = f("contest_currentnumber")
4444 k((("contest_" + toString(n)) + "_status"))
4545 }
4646
4747
48-@Callable(o)
49-func setContestStatus (p,q) = {
50- let r = toBase58String(o.caller.bytes)
51- if ((r != c))
48+func o (p) = {
49+ let n = f("contest_currentnumber")
50+ k(((("contest_" + toString(n)) + "_") + p))
51+ }
52+
53+
54+@Callable(q)
55+func setContestStatus (r,s) = {
56+ let t = toBase58String(q.caller.bytes)
57+ if ((t != c))
5258 then throw("Only dAPP Owner can set Contest Status.")
53- else if (if ((q != a))
54- then (q != b)
59+ else if (if ((s != a))
60+ then (s != b)
5561 else false)
56- then throw(("Invalid status: " + q))
57- else WriteSet([DataEntry((("contest_" + toString(p)) + "_status"), q)])
62+ then throw(("Invalid status: " + s))
63+ else WriteSet([DataEntry((("contest_" + toString(r)) + "_status"), s)])
5864 }
5965
6066
6167
62-@Callable(o)
63-func setContestConfiguration (s,t) = {
64- let r = toBase58String(o.caller.bytes)
65- let u = f("contest_currentnumber")
66- let v = k((("contest_" + toString(u)) + "_status"))
67- let n = (u + 1)
68- if ((r != c))
68+@Callable(q)
69+func setContestConfiguration (u,v) = {
70+ let t = toBase58String(q.caller.bytes)
71+ let w = f("contest_currentnumber")
72+ let x = k((("contest_" + toString(w)) + "_status"))
73+ let n = (w + 1)
74+ if ((t != c))
6975 then throw("Only dAPP Owner can Configure Contest.")
70- else if ((height >= t))
76+ else if ((height >= v))
7177 then throw(("Start Height must be greater than current Blockchain height: " + toString(height)))
72- else if ((v == a))
73- then throw(("You cannot configure a new Contest while old Contest status is: " + v))
74- else if ((s != d))
75- then throw((("dAPP does not support currency: " + s) + " yet."))
78+ else if ((x == a))
79+ then throw(("You cannot configure a new Contest while old Contest status is: " + x))
80+ else if ((u != d))
81+ then throw((("dAPP does not support currency: " + u) + " yet."))
7682 else {
77- let w = (t + (7 * 1440))
78- WriteSet([DataEntry("contest_currentnumber", n), DataEntry((("contest_" + toString(n)) + "_currency"), s), DataEntry((("contest_" + toString(n)) + "_startheight"), t), DataEntry((("contest_" + toString(n)) + "_finishheight"), w), DataEntry((("contest_" + toString(n)) + "_status"), a)])
83+ let y = (v + (7 * 1440))
84+ WriteSet([DataEntry("contest_currentnumber", n), DataEntry((("contest_" + toString(n)) + "_currency"), u), DataEntry((("contest_" + toString(n)) + "_startheight"), v), DataEntry((("contest_" + toString(n)) + "_finishheight"), y), DataEntry((("contest_" + toString(n)) + "_status"), a)])
7985 }
8086 }
8187
8288
8389
84-@Callable(o)
85-func bet (x) = {
86- let y = base58'2B3mWxfnhAaCpJuqbkbiD6HVCTEcgwdmzxFCjZe65NYg'
87- let r = toBase58String(o.caller.bytes)
88- let z = extract(o.payment)
90+@Callable(q)
91+func bet (p) = {
92+ let z = base58'2B3mWxfnhAaCpJuqbkbiD6HVCTEcgwdmzxFCjZe65NYg'
93+ let t = toBase58String(q.caller.bytes)
94+ let A = extract(q.payment)
8995 let n = f("contest_currentnumber")
90- let t = f((("contest_" + toString(n)) + "_startheight"))
91- let w = f((("contest_" + toString(n)) + "_finishheight"))
92- let q = k((("contest_" + toString(n)) + "_status"))
93- if ((height > (w - (2 * 1440))))
96+ let v = f((("contest_" + toString(n)) + "_startheight"))
97+ let y = f((("contest_" + toString(n)) + "_finishheight"))
98+ let s = k((("contest_" + toString(n)) + "_status"))
99+ if ((height > (y - (2 * 1440))))
94100 then throw("You cannot bet anymore at this height.")
95- else if ((q != a))
101+ else if ((s != a))
96102 then throw("Invalid status: you cannot bet now.")
97- else if (if ((z.assetId != y))
103+ else if (if ((A.assetId != z))
98104 then true
99- else (z.amount != 500000))
105+ else (A.amount != 500000))
100106 then throw("You must pay 5 WLT to bet.")
101- else WriteSet([DataEntry(((("bet_" + toString(n)) + "_") + r), x)])
107+ else if ((o(p) != e))
108+ then throw("Someone already bet on this value.")
109+ else WriteSet([DataEntry(((("bet_" + toString(n)) + "_") + p), t)])
102110 }
103111
104112
105-@Verifier(A)
106-func B () = {
107- let i = A
113+@Verifier(B)
114+func C () = {
115+ let i = B
108116 if (if ($isInstanceOf(i, "SetScriptTransaction"))
109117 then true
110118 else $isInstanceOf(i, "DataTransaction"))
111- then sigVerify(A.bodyBytes, A.proofs[0], A.senderPublicKey)
119+ then sigVerify(B.bodyBytes, B.proofs[0], B.senderPublicKey)
112120 else if ($isInstanceOf(i, "InvokeScriptTransaction"))
113121 then true
114122 else true
115123 }
116124

github/deemru/w8io/169f3d6 
84.83 ms